-
Webpack in it's simple form is module bundler and Babel is a transpiler.
-
Webpack takes modules with dependencies and generates static assets representing those modules
-
It understands
css
andimages
are also dependencies -
Webpack
-w/watch
orwatch:true
in config file for watching continous changes in file and automatically it will do the bundling process -
Webpack only knows how to read and understand js files
-
Loaders teach webpack how to load files for bundling
-
We are using 3rd Party transpiler like babel to convert our es6/es7 code to old Javascript syntax (es5).
For live reload,webpack creates a dev server to easily check our code
Just type webpack-dev-server
in project root directory
Browse http://localhost:8080