-
-
Notifications
You must be signed in to change notification settings - Fork 34
Add rolldown-vite 7.2.3+ support #139
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
base: main
Are you sure you want to change the base?
Add rolldown-vite 7.2.3+ support #139
Conversation
|
@davidmyersdev Could you take a look at this PR? @sapphi-red It might be worth updating this PR to target vite 8 beta instead? I'm currently using vite 8 beta, and things seem to work okay with this plugin, but I am getting the following warning: I believe that's because vite-plugin-node-polyfills/src/index.ts Line 242 in 282420a
I think instead it should probably be: ...(isRolldownVite
? {}
: {
esbuild: {
// In dev, the global polyfills need to be injected as a banner in order for isolated scripts (such as Vue SFCs) to have access to them.
banner: isDev ? globalShimsBanner : undefined,
},
}),since you already did the code to do the banner via a plugin for rolldown, right? I was going to submit a PR myself for this and the transform change, but saw that you have the transform change in this PR already see: main...shahmir-oscilar:vite-plugin-node-polyfills:main for reference |
|
This would be very helpful for unblocking my team! 🤝 |
To be honest, I'm not sure whether this |
According to the migration guide,
I wonder if this is some code that could easily be taken from the Vite repo and placed in here for handling the banner? Also sorry @sapphi-red, perhaps my comment is ignorant, I'm somewhat just speculating. Thanks for all your hard work on Vite and related projects! |
rolldown-vite 7.2.3 has a breaking change (https://github.com/rolldown/rolldown/releases/tag/v1.0.0-beta.48) and this PR changes the code for it.
This PR also changes the deprecated
optimizeDeps.rollupOptionstooptimizeDeps.rolldownOptions.The new options are only supported by rolldown-vite 7.1.19+, so users using the older version would have to upgrade rolldown-vite together.