Skip to content

Instantly share code, notes, and snippets.

@z2015
Created May 25, 2016 03:24
Show Gist options
  • Select an option

  • Save z2015/cc5e999816fb651c925a43a6f29408d8 to your computer and use it in GitHub Desktop.

Select an option

Save z2015/cc5e999816fb651c925a43a6f29408d8 to your computer and use it in GitHub Desktop.
hot module replacement with webpack

/* style.css */ body { background: red; }

/* entry.js */ require("./style.css"); document.write("");

npm install webpack webpack-dev-server -g npm install webpack css-loader style-loader webpack-dev-server ./entry --hot --inline --module-bind "css=style!css"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment