Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

vue-cli-plugin-bundle-sw

kalgan7ISC0.0.4

[WIP] not ready for your projects

vue, cli, sw, service worker, build

readme

vue-cli-plugin-bundle-sw

[WIP] not ready for your projects

Sample config in your vue.config.js file:

const IS_DEV = process.env.NODE_ENV === 'development'

module.exports = {
  pluginOptions: {
    swBundle: {
      src: path.resolve(__dirname, 'src', 'sw.js'),
      dest: 'service-worker.js',
      workboxOptions: {
        importWorkboxFrom: IS_DEV ? 'cdn' : 'local'
      },
      silent: false
    }
  }
}