Webpack Flashcards
1
Q
What is Webpack?
A
It’s a tool that lets you bundle your JavaScript applications (supporting both ESM and CommonJS), and it can be extended to support many different assets such as images, fonts and stylesheets.
2
Q
How do you add a devDependency to a package?
A
npm install webpack –save-dev
10:00
npm install webpack-cli –save-dev
3
Q
What is an NPM script?
A
A convenient way to bundle common shell commands like a set of built-in and custom scripts for your project.
4
Q
How do you execute Webpack with npm run?
A
npm run build
(depends what you named your script, in this case it was:
“scripts”: {
“build”: “webpack”,
“test”: “echo "Error: no test specified" && exit 1”
})