Webpack Offline Plugin Example

A companion repository to this blog post.

Setup

  • npm i
  • npm run build
  • npm start

Usage

  • Go on the URL mentioned in the console after npm start
  • Open dev-tools to see what is loaded from the servers
  • Click the Cache Assets button
  • Set the network to offline in the dev-tools (or deactivate your network entirely)
  • Reload the page to see that nothing is loaded from the servers