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

ValidationError: "importWorkboxFrom" is not allowed #28

Closed
kolaente opened this issue Feb 23, 2021 · 1 comment
Closed

ValidationError: "importWorkboxFrom" is not allowed #28

kolaente opened this issue Feb 23, 2021 · 1 comment

Comments

@kolaente
Copy link

Hey there, I get this error message when building:

$ npx vite build
vite v2.0.2 building for production...
✓ 1036 modules transformed.
(node:21472) UnhandledPromiseRejectionWarning: ValidationError: "importWorkboxFrom" is not allowed
(node:21472) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:21472) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

The build itself seems to work, but I'm not sure what the error message means.

This is my vite.config.js:

module.exports = {
	plugins: [
		VitePWA({
			strategies: 'injectManifest',
			injectManifest: {
				importWorkboxFrom: 'local',
				swSrc: './src/ServiceWorker/sw.js',
			},
			manifest: {
				// ... A lot of manifest config ...
			},
		}),
	],
}
@antfu
Copy link
Member

antfu commented Feb 24, 2021

@antfu antfu closed this as completed Feb 24, 2021
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

2 participants