Skip to content

Error: [InjectManifest] 'plugins' property is not expected to be here. #69

@winston0410

Description

@winston0410

I tried to pass rollup plugins to my build of injectManifest like this, which is what the type is describing:

import replace from '@rollup/plugin-replace';
import terser from '@rollup/plugin-terser';

			SvelteKitPWA({
				strategies: 'injectManifest',
				// // this affect whether workbox output log and the bundle is minified or not
				// mode: "development",
				mode: "production",
				registerType: "prompt",
				injectManifest: {
					globIgnores: ["server/**", "**/*.{css,js}"],
					globPatterns: ["**/*.{ico,jpg,jpeg,png,svg,woff,woff2}"],
					plugins: [
						replace({
							'process.env.NODE_ENV': JSON.stringify('production')
						  }),
						terser()
					]
				}
			})

But then I get this error:

Error: [InjectManifest] 'plugins' property is not expected to be here.

I am using "@vite-pwa/sveltekit": "0.2.7",

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions