-
-
Notifications
You must be signed in to change notification settings - Fork 7k
feat(legacy): add rolldown-vite support #20417
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?
feat(legacy): add rolldown-vite support #20417
Conversation
packages/plugin-legacy/package.json
Outdated
@@ -32,8 +33,16 @@ | |||
}, | |||
"homepage": "https://github.com/vitejs/vite/tree/main/packages/plugin-legacy#readme", | |||
"funding": "https://github.com/vitejs/vite?sponsor=1", | |||
"imports": { | |||
"#legacy-for-rolldown-vite": { | |||
"types": "./vendor/legacy-for-rolldown-vite.d.ts", |
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.
Is types need to be published?
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.
It doesn't have to be. It is now removed from the published package (ca83b7d).
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.
Looks good to me!
Description
This PR adds rolldown-vite support to plugin-legacy.
This PR achieves that by downloading a built package that is published to pkg.pr.new on rolldown-vite repo and vendoring + loading that in the package.
The upsides of this approach are:
The downsides of this approach are:
viteLegacyPlugin
/default
should be synced between the normal plugin-legacy and the one for rolldown-vite support. this limitation should be fine.To update the version for rolldown-vite support, we can update this line:
vite/packages/plugin-legacy/tsdown.config.ts
Lines 6 to 8 in 20b727b