Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
winston0410 opened this issue Oct 21, 2023 · 1 comment

Comments

@winston0410
Copy link

winston0410 commented Oct 21, 2023

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",

@winston0410
Copy link
Author

My follow up question is, is there an option to trigger minify for injestManifest, without adding rollup plugin ourselves?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant