问题
Last night I attempted to create a PWA using the latest aurelia-cli (version 0.32.0). I created a custom setup with au new
that uses Webpack and TypeScript.
After that I followed the Workbox with Webpack instructions from Google.
- npm install workbox-cli --saveDev
- npm install workbox-webpack-plugin --saveDev
- service worker is running
- offline fails doesn't find webpack-dev-server.js (not in dist), app.xxx.bundle.js and vendor.asdf.js are not in the generated sw.js even though in dist folder
- au run --watch infinite compiling loop
My code is in my Github branch, but by following these steps you should be able to reproduce it.
Am I placing the WorkboxPlugin in the webpack.config.js
in the wrong place?
How do I get the offline with the service worker working?
来源:https://stackoverflow.com/questions/48023333/aurelia-cli-pwa-with-webpack-and-workbox