Skip to content

Option to turn off PWA generation #3830

Closed
@holtwick

Description

@holtwick

What problem does this feature solve?

If building for multiple targets, some of them might not support PWA. It would be great to have an option to turn off the functionality

What does the proposed API look like?

Currently the only way is to use a env var VUE_CLI_BUILD_TARGET different to app: https://github.com/vuejs/vue-cli/blob/dev/packages/%40vue/cli-plugin-pwa/index.js#L4

This line could e.g. be changed to:

if (target && target !== 'app' || options.pwa.off === true) {
      return
}

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions