rollupOptions
First added
8.2.0
About
Custom Rollup options used to build the service worker.
This does not allow output and plugins. To add Rollup/Vite plugins, use plugins instead.
Usage
export default defineConfig({
plugins: [
// Other plugins...
serwist({
swSrc: "src/sw.ts",
swDest: "sw.js",
globDirectory: "dist",
injectionPoint: "self.__SW_MANIFEST",
rollupFormat: "iife",
rollupOptions: {
logLevel: "silent",
},
}),
],
});
More resources
Here is a list of resources you can read to learn more about rollupOptions
: