webpack Flashcards

1
Q

What is Webpack?

A

allows for one to write modules that can handle resources and assets at the same time.

take a bunch of javascript files combine into one

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

How do you add a devDependency to a package?

A

npm install –save-dev (name of)
npm install –save-dev webpack
npm install webpack –save-dev

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What is an NPM script?

A

commands or string of commands that are stored in a project’s package.json file under scripts.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

How do you execute Webpack with npm run?

A

npm run (script name)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

How are ES Modules different from CommonJS modules?

A

ES modules allow for es6 modules to go beyond commonJS and AMD, while having a format that CJS and AMD people can use

CJS uses modules.exports / require

es modules use import / export statements

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What kind of modules can Webpack support?

A

ecmasCRIPT, cOMMONjs amd

How well did you know this?
1
Not at all
2
3
4
5
Perfectly