Open
Description
Version
4.5.4
Reproduction link
This is just the default created by vue-cli
with PWAs enabled:
https://github.com/KB1RD/google-cdn-default
Environment info
System:
OS: Linux 4.4 Ubuntu 16.04.6 LTS (Xenial Xerus)
CPU: (16) x64 AMD Ryzen 7 1700 Eight-Core Processor
Binaries:
Node: 12.16.1 - /usr/local/bin/node
Yarn: 1.21.1 - /usr/local/bin/yarn
npm: 6.13.4 - /usr/local/bin/npm
Browsers:
Chrome: Not Found
Firefox: 77.0.1
npmPackages:
@ant-design-vue/babel-helper-vue-transform-on: 1.0.1
@vue/babel-helper-vue-jsx-merge-props: 1.0.0
@vue/babel-plugin-transform-vue-jsx: 1.1.2
@vue/babel-preset-app: 4.5.4
@vue/babel-preset-jsx: 1.1.2
@vue/babel-sugar-functional-vue: 1.1.2
@vue/babel-sugar-inject-h: 1.1.2
@vue/babel-sugar-v-model: 1.1.2
@vue/babel-sugar-v-on: 1.1.2
@vue/cli-overlay: 4.5.4
@vue/cli-plugin-babel: ~4.5.0 => 4.5.4
@vue/cli-plugin-eslint: ~4.5.0 => 4.5.4
@vue/cli-plugin-pwa: ~4.5.0 => 4.5.4
@vue/cli-plugin-router: 4.5.4
@vue/cli-plugin-vuex: 4.5.4
@vue/cli-service: ~4.5.0 => 4.5.4
@vue/cli-shared-utils: 4.5.4
@vue/component-compiler-utils: 3.2.0
@vue/preload-webpack-plugin: 1.1.2
@vue/web-component-wrapper: 1.2.0
eslint-plugin-vue: ^6.2.2 => 6.2.2
vue: ^2.6.11 => 2.6.12
vue-eslint-parser: 7.1.0
vue-hot-reload-api: 2.3.4
vue-loader: 15.9.3 (16.0.0-beta.5)
vue-style-loader: 4.1.2
vue-template-compiler: ^2.6.11 => 2.6.12
vue-template-es2015-compiler: 1.9.1
npmGlobalPackages:
@vue/cli: 4.4.6
Steps to reproduce
- Run
yarn build
- Look in @/dist/service-worker.js. Notice the
importScripts("https://storage.googleapis.com/workbox-cdn/releases/4.3.1/workbox-sw.js");
line. - Note that this still happens when building a custom worker with
InjectManifest
What is expected?
- The documentation for @vue/cli-plugin-pwa should inform users that the Google CDN will be used and provide a method for changing CDNs or switching to all-local serving
- This method should not be too complicated
What is actually happening?
- There seems to be no warning or note anywhere that the CDN will be used, except if the user is familiar with workbox
- The method to change CDNs is too complicated. As far as I can tell, this would involve having a separate webpack build that builds the worker and uses
InjectManifest
to make it work, but I still cannot figure out how to remove the CDN (except by editing it out post-build)
Metadata
Metadata
Assignees
Labels
No labels