-
-
Notifications
You must be signed in to change notification settings - Fork 6.3k
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
Plugin legacy skip emit assets #7422
Comments
Related: #6584. That PR fixes some issues, which seems to conflict with this feature request. Can you further elaborate your use case and provide some examples of it? |
@bluwy Now I leave you the link to the plugin here. You can try it and see that for the legacy bundle the CSS is empty. This can be fixed by generating the legacy bundle after the standard flow or giving the possibility through a param to choose if I need the CSS in the chunking phase during the legacy generation. Thanks |
@bluwy I created a PR to cover those requirements. If you can see it, is very simple and it'a implementation is covered by a documentation that tells the purpose. Thanks in advance |
Thanks for providing your usecase. I tested this on stackblitz and it seems to be working fine in a different way. It looks like Vite already inlines css in legacy with this code vite/packages/vite/src/node/plugins/css.ts Lines 459 to 468 in 1d468c8
so maybe it's not needed for the plugin to handle it? |
Thanks, I knew about the configuration through Vite, but in this case, I cannot choose the details. |
Describe the bug
Hi guys, the latest version of the legacy plugin, no longer issues assets. This does not allow some plugins I use to apply logic even to the generated legacy bundle.
The line is this:
opts.__vite_skip_asset_emit__ = true
I think it is more appropriate to give the possibility to decide by means of a parameter. Obviously, you can set it to true by default in order to skip.
That would be great, thank you in advance, and thank you for your work ❤️.
Reproduction
All
System Info
Used Package Manager
npm
Logs
Validations
The text was updated successfully, but these errors were encountered: