Aurelia CLI PWA with Webpack and Workbox

心不动则不痛 提交于 2019-12-08 05:37:59

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!