π΄ Starter with Webpack & Babel.js
- β Webpack
- β Babel (Core)
- β
Support syntax
ES2015+ - β
Distribution directory
dist/ - β
Directory with files as-is without changes
static/(they will copied todist/static/) - β
Development with
webpack-dev-server - β
Hosting with
http-server - β
Bundle file size analytics with
webpack-bundle-analyzer - β Two build strategies: dev (with source maps) & prod (compress file)
You can start in two ways:
mkdir PROJECT_NAME
cd $_ # Note: "$_" is the last argument of the previous command
git init # Note: branch "master" is created
git remote add boilerplate git@github.com:piecioshka/boilerplate-webpack-babel.git
git pull boilerplate master
git remote remove boilerplateor ...
- Download package file: https://github.com/piecioshka/boilerplate-webpack-babel/archive/master.zip
- Extract it to your project directory.
npm run build # Development mode
npm run build:development # Development mode
npm run build:production # Production modeTIP: Serve dist/ directory by npm start
npm run dev # Use webpack-dev-serveror
npm run watch # Use webpack -wTIP: Serve dist/ directory by npm start
npm run clear # Remove only dist/
npm run clear:all # Remove dist/ & node_modules/When would you like a modified Webpack configuration, please add a new "addon" to webpack/addons/ directory.
- webpack.bundleAnalyzer.js - Analysis of bundle file weight
- webpack.copyStatic.js - Copy directory
static/todist/static/(Enabled by default)
# Single addon
npm run dev -- --env addons=singleAddon
npm run build -- --env addons=singleAddon
npm run watch -- --env addons=singleAddon
npm run build:development -- --env addons=singleAddon
npm run build:production -- --env addons=singleAddon
## Multiple addons
npm run dev -- --env addons=firstAddon,secondAddonThe MIT License @ 2017