-
-
Notifications
You must be signed in to change notification settings - Fork 224
fix: avoid assigning to bundle object #843
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
fix: avoid assigning to bundle object #843
Conversation
✅ Deploy Preview for vite-plugin-pwa-legacy ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
Thx ❤️ , I need to include this in Vite 6 Env. Api pr |
commit: |
I'm checking integrations with a local tgz from this PR:
I'm checking also if we need to add the emit for |
Ah, yes, that should be changed as well. I'll update the PR. |
@sapphi-red just a question about vite and rolldown: we've small problem importing stuff from rollup, we should import rollup types from vite, but NOTE: I don't want to change the imports here, it is fine, just doing final SvelteKit test... |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thx ❤️
Description
Assigning to
bundle
object is discouraged by rollup and is not supported by rolldown.This PR changes the code using assignment to use
this.emitFile
instead. This would make vite-plugin-pwa work with Rolldown powered Vite.If the plugin context is not passed to
api.generateBundle
, it will still use the previous method for backward compat.Linked Issues
Additional Context
Tip
The author of this PR can publish a preview release by commenting
/publish
below.