Webpack Flashcards

1
Q

What is Webpack?

A

takes a bunch of js files and 3rd party dependencies –> makes 1 file

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 packageName

if you don’t do –save-dev it adds to regular dependencies instead of devDependencies

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

What is an NPM script?

A

give us shortcut scripts to run other 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

update package.json “scripts”

npm run build

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

devDependecies

regular dependency

A

devDependencies: TOOL used in development process

dependency: project directly uses in code

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

webpack process

A

if you change your js code, must run webpack build again (use “npm run watch” command to automate this)

src: contains your js code
main. js: NEVER EDIT THIS; webpack will make this

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

lib folder

A

menial tasks for helper functions:

  • creating an element
  • formatting $
  • formatting dates
How well did you know this?
1
Not at all
2
3
4
5
Perfectly