Skip to content

Commit

Permalink
chore: include plugins internal usage as warning
Browse files Browse the repository at this point in the history
  • Loading branch information
userquin committed Feb 10, 2024
1 parent a2adacc commit 0e6cf1c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion guide/inject-manifest.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,11 +81,13 @@ injectManifest: {

### Custom Rollup and Vite Plugins <Badge type="tip" text="from v0.18.0+" />

From `v0.18.0`, you can add custom Rollup and/or Vite plugins to the service worker build, using `rollup` and `vite` in `buildPlugins` options.
From `v0.18.0`, you can add custom Rollup and/or Vite plugins to the service worker build, using `rollup` and `vite` options in the new `buildPlugins` option.

::: warning
The old `plugins` option has been deprecated, use `buildPlugins.rollup` instead:
- if `buildPlugins.rollup` is configured then `plugins` will be ignored
- if `buildPlugins.rollup` is not configured then `plugins` will be used
:::

You can check the [vue-router example](https://github.com/vite-pwa/vite-plugin-pwa/tree/main/examples/vue-router) using a custom Vite plugin with a simple virtual module consumed by both custom service workers.

Expand Down

0 comments on commit 0e6cf1c

Please sign in to comment.