rjkip / webpack-hmr-minimal

:sparkles: Minimal Webpack Hot Module Reloading Implementation :sparkles:

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Minimal Webpack Hot Module Reloading Implementation

$ # Install dependencies
$ yarn
$ # Run hot-reloading development server with inline page reload script
$ node_modules/.bin/webpack-dev-server --inline --hot --content-base build/
  • Visit http://localhost:8080/.
  • Change ./src/message.js. Note how the document body is updated.
  • Change ./src/app.js. Note how the entire page is reloaded.

All modules that are not accepted by module.hot.accept cause page reloads.

About

:sparkles: Minimal Webpack Hot Module Reloading Implementation :sparkles:


Languages

Language:JavaScript 64.8%Language:HTML 35.2%