rollupFormat
First added
8.2.0
Default
"es"
About
The format used to build the service worker. Usually used alongside type.
Usage
export default defineConfig({
plugins: [
// Other plugins...
serwist({
rollupFormat: "iife",
type: "classic",
swSrc: "src/sw.ts",
swDest: "sw.js",
globDirectory: "dist",
injectionPoint: "self.__SW_MANIFEST",
}),
],
});
More resources
Here is a list of resources you can read to learn more about rollupFormat
: