Skip to content

Add rolldown-vite support#128

Merged
davidmyersdev merged 3 commits intodavidmyersdev:mainfrom
sapphi-red:add-rolldown-vite-support
Jul 6, 2025
Merged

Add rolldown-vite support#128
davidmyersdev merged 3 commits intodavidmyersdev:mainfrom
sapphi-red:add-rolldown-vite-support

Conversation

@sapphi-red
Copy link
Contributor

While this plugin mostly works with rolldown-vite, there are a few areas where it could leverage Rolldown's built-in features to improve performance.

This PR includes the following changes:

  • Use build.rollupOptions.inject for rolldown-vite: this avoids the extra parsing step by @rollup/plugin-inject and can improve perf.
  • Use the banner hook of a Rollup plugin for optimizeDeps.rollupOptions instead of the banner option in optimizeDeps.esbuildOptions: most options in optimizeDeps.esbuildOptions are mapped to optimizeDeps.rollupOptions, but banner is not due to incompatibility.
  • Add CI to ensure rolldown-vite support

I tested this with https://github.com/owncloud/web 1 and it reduced the build time ~3.5s (~25%).

close vitejs/rolldown-vite#133

Footnotes

  1. I used sass-embedded instead of sass locally

@davidmyersdev
Copy link
Owner

@sapphi-red I fixed an issue with the PNPM install on CI, but it looks like the new workflow is failing for another reason now. Mind taking a look at that?

@sapphi-red
Copy link
Contributor Author

@davidmyersdev
Thanks! The error was caused by the node version (Vite 7 requires 20.19+, 22.10+). I've pushed a commit to update the node version in CI.

@davidmyersdev
Copy link
Owner

That did it! Thank you!

@davidmyersdev davidmyersdev merged commit ca49ba3 into davidmyersdev:main Jul 6, 2025
5 checks passed
@davidmyersdev
Copy link
Owner

Released in v0.24.0.

@sapphi-red sapphi-red deleted the add-rolldown-vite-support branch July 7, 2025 08:00
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

Successfully merging this pull request may close these issues.

plugin-node-polyfills wrapper

2 participants