This is a boilerplate for a webpack-enabled application. The intention behind this is to setup a working webpack environment for development allowing for the use of ES6 via Babel and styling with LESS. It is not meant to be used as a template of scaffolding as all of the files (besides the img dir) are in the root folder.
Starting the app will launch a webpack-dev-server instance, which has been setup with hot loading to automatically refresh your browser / process code (less/js) anytime a file is changed.
-
Install dependencies
npm install
-
Start the application
npm start
this has been configured in package.json
scripts : { "start": "webpack-dev-server" }
-
Navigate to
localhost:8080
this option can be changed in webpack.config.js
devServer: { port: 8008 }
Webpack takes care of minification/uglify.
To get your code ready for production, simply run this command: webpack -p
This project contains the following webpack loaders: