Webpack 2 + ES6 boilerplate
Webpack 2 + ES6 boilerplate (currently WIP)
$ git clone git@github.com:martincleto/webpack2-es6.git
$ git clone https://github.com/martincleto/webpack2-es6.git
$ npm install
$ npm test
$ npm start
creates a development build and starts a web server at http://localhost:8080$ npm run build
generates a production build$ npm run watch
watches the updates on your project filesThis boilerplate comes with Bourbon library for convenient SASS development.
If you want to use other SASS libraries (or no libraries at all) just follow these steps
$ npm uninstall node-bourbon --save dev
This boilerplate includes PostCSS via Webpack postcss-loader for enabling autoprefixer plugin.
If you want to add or remove PostCSS plugins you need to update the postcss section into package.json
In order to improve and lint your bundle, you might want to inspect and analyze it. A bundle-stats
npm script is available for this purpose.
$ mkdir stats
$ npm run bundle-stats
: a webpack-bundle-stats.json file will be created into stats/ folderEdit package.json to change path and JSON file name at your convenience.