Skip to main content

devOptions

First added

8.2.0

About

Development-specific options.

Options

  • bundle — Whether the service worker should be bundled in development mode. Defaults to true.
  • minify — Whether the service worker should be minified in development mode. Defaults to false.

Usage

export default defineConfig({
  plugins: [
    // Other plugins...
    serwist({
      swSrc: "src/sw.ts",
      swDest: "sw.js",
      globDirectory: "dist",
      injectionPoint: "self.__SW_MANIFEST",
      rollupFormat: "iife",
      devOptions: {
        bundle: false,
        minify: false,
      },
    }),
  ],
});