webpack-hot-middleware-example

Example of using webpack-hot-middleware

Usage no npm install needed!

<script type="module">
  import webpackHotMiddlewareExample from 'https://cdn.skypack.dev/webpack-hot-middleware-example';
</script>

README

Webpack Hot Middleware Example

  • Install deps
npm install
  • Start server
npm start
  • Open page in browser http://localhost:1616
  • Open the developer console
  • Edit client.js & save
  • Watch the page reload
  • Also try making a syntax error in client.js.

Multiple Entry Points Example

There is also an example for multiple entry points in webpack.

npm run start:multientry
  • Open page in browser http://localhost:1616/multientry
  • Edit client.js or extra.js & save