Open TPORL opened 7 years ago
service-worker.js
加了stripPrefix就没问题了
new SWPrecachePlugin({ // ... stripPrefix: path.resolve(__dirname, '../').replace(/\\/g, '/') })
参考: https://github.com/goldhand/sw-precache-webpack-plugin/issues/11
Service workers can only be used on a server. Vue hacker news comes with a server you can use by running npm start # or yarn start from within the root of the project.
npm start # or yarn start
service-worker.js
加了stripPrefix就没问题了
参考: https://github.com/goldhand/sw-precache-webpack-plugin/issues/11