-
-
Notifications
You must be signed in to change notification settings - Fork 5.8k
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
context method emitFile() is not supported in serve mode. This plugin is likely not vite-compatible. #7029
Comments
Is emitting the file required in serve/dev mode? Vite logs a warning as emitting a file in serve mode doesn't make sense (all files are kept in memory), but it will work in builds as that's a normal rollup process. If your plugin is for builds only, you can set |
@bluwy does this only work build mode? |
Yeah |
@bluwy is any alternative of emitFile to use in dev mode |
You can use PS: Closing this as this is expected behaviour from Vite, and is leaning towards a discussion. |
generateBuild is also not calling . |
There is no |
Describe the bug
I try to use this.emitFile like this
but emitfile is not generated a d gives warning:
context method emitFile() is not supported in serve mode. This plugin is likely not vite-compatible.
(In rollup this.emitFile is used with generateBundle instead of transform)
Is there any Changes in vite because I take the reference from rollUp
Reproduction
.
System Info
Used Package Manager
npm
Logs
No response
Validations
The text was updated successfully, but these errors were encountered: