1

我在开发环境中。

我安装了使用workbox-webpack-plugin的 cli-plugin-pwa。我的文件很简单:vue.config.js

// ...
  // 'GenerateSW' is the default workboxPluginMode
  pwa: {
    name: 'MyProject',
    themeColor: '#3C60BE',
    msTileColor: '#20AB72',
    workboxOptions: {
      swDest: './public/service-worker.js'
    }
  }
// ...

所以工作箱应该service-worker.js在我启动服务器时生成一个文件,./public但它没有。

我有什么不对吗?

4

0 回答 0