devOptions
First added
8.2.0
About
Development-specific options.
Options
bundle
— Whether the service worker should be bundled in development mode. Defaults totrue
.minify
— Whether the service worker should be minified in development mode. Defaults tofalse
.
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,
},
}),
],
});