Skip to content

webpack usage

Jesse edited this page Jul 22, 2016 · 3 revisions
  1. install node, npm

  2. install webpack

npm install -g webpack
  1. init project

npm init
  1. write dependences into project

    //add webpack
    `npm install webpack --save-dev`
    //add html genterator
    `npm install html-webpack-plugin --save-dev`
    //add web server
    `npm install webpack-dev-server --save-dev`
    //add css loader
    `npm install css-loader style-loader --save-dev`

after config webpack.config.js. run webpack on the root folder of your project.

Clone this wiki locally