Homepage
Open in app
Sign in
Get started
Introduction
Introduction
What is Webpack?
Bharat Tiwari
May 5, 2017
Setup and Installation
Setup and Installation
Basic folder structure setup
Bharat Tiwari
May 5, 2017
Installing Webpack
Installing Webpack
Two options:
Bharat Tiwari
May 5, 2017
Webpack configuration file
Webpack configuration file
In the last section, we ran the webpack command (on terminal or via npm script) with two arguments:
Bharat Tiwari
May 5, 2017
using html-webpack-plugin to generate index.html
using html-webpack-plugin to generate index.html
Now that we got webpack configured to package and bundle our js code in a single file -app.bundle.js, we need an index.html for our web app…
Bharat Tiwari
May 5, 2017
‘watch’ Mode
‘watch’ Mode
We can have webpack running in a watch mode. With watch-mode enabled, webpack will keep ‘watch’-ing for any changes we make in our code and…
Bharat Tiwari
May 6, 2017
Bundling module dependencies
Bundling module dependencies
To see how webpack bundles and packages our other dependent javascript modules in the final app.bundle.js, lets create another js file and…
Bharat Tiwari
May 6, 2017
Resolve common file extensions
In the previous section, we imported our my-helper-module in our app.js as below:
Bharat Tiwari
May 6, 2017
Multiple Entries
Multiple Entries
Sometimes you may want to package your javascript files into multiple bundles.
Bharat Tiwari
May 6, 2017
Multi-page applications
Multi-page applications
What if we have a multi-page app? Lets say, we have two html files — index.html and settings.html. index.html uses app.js and settings.html…
Bharat Tiwari
May 7, 2017
Common chunks
Common chunks
In order to understand common chunks, lets create a 'sharedModule.js' in our ./src/scripts folder.
Bharat Tiwari
May 7, 2017
webpack-dev-server (WDS)
webpack-dev-server (WDS)
So far we have been verifying our changes, that we made to our code locally on the system, by manually opening the index.html in the…
Bharat Tiwari
May 7, 2017
About A beginner’s guide to Webpack 2
Latest Stories
Archive
About Medium
Terms
Privacy
Teams