We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7d06f09 commit 85e6e5eCopy full SHA for 85e6e5e
packages/@vue/cli-plugin-pwa/index.js
@@ -1,5 +1,10 @@
1
module.exports = (api, options) => {
2
api.chainWebpack(webpackConfig => {
3
+ const target = process.env.VUE_CLI_BUILD_TARGET
4
+ if (target && target !== 'app') {
5
+ return
6
+ }
7
+
8
const name = api.service.pkg.name
9
const userOptions = options.pwa || {}
10
packages/@vue/cli-service/lib/Service.js
@@ -194,10 +194,9 @@ module.exports = class Service {
194
195
// check if the user has manually mutated output.publicPath
196
const target = process.env.VUE_CLI_BUILD_TARGET
197
- const exceptionTargets = ['lib', 'wc', 'wc-async']
198
if (
199
!process.env.VUE_CLI_TEST &&
200
- !exceptionTargets.includes(target) &&
+ (target && target !== 'app') &&
201
config.output.publicPath !== this.projectOptions.baseUrl
202
) {
203
throw new Error(
0 commit comments