/webpack-boilerplate

This is a boilerplate for a webpack-enabled application

Primary LanguageJavaScriptGNU General Public License v3.0GPL-3.0

webpack-boilerplate

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.

Getting Started

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.

  1. Install dependencies npm install

  2. Start the application npm start

    this has been configured in package.json

     scripts : {
         "start": "webpack-dev-server"
     }
    
  3. Navigate to localhost:8080

    this option can be changed in webpack.config.js

      devServer: {
         port: 8008
     }
    

Distributing your application

Webpack takes care of minification/uglify. To get your code ready for production, simply run this command: webpack -p

Webpack Loaders

This project contains the following webpack loaders:

development loaders
styling loaders
image loaders