-
-
Notifications
You must be signed in to change notification settings - Fork 18
feat: introduce experimental v3 native plugins #483
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: rolldown-vite
Are you sure you want to change the base?
Conversation
ecc5731 to
165a101
Compare
097a16d to
747c24e
Compare
ce51c11 to
9ee6920
Compare
dba3281 to
d6b9c56
Compare
d6b9c56 to
6eddf7b
Compare
6eddf7b to
689f9ba
Compare
| renderBuiltUrl: undefined, | ||
| hmrPartialAccept: false, | ||
| enableNativePlugin: process.env._VITE_TEST_JS_PLUGIN ? false : 'v1', | ||
| enableNativePlugin: process.env._VITE_TEST_JS_PLUGIN ? false : true, |
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 needs to be reverted before merging.
689f9ba to
122013a
Compare
| case 'v1': | ||
| case true: | ||
| return 1 | ||
| case true: |
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.
| case true: | |
| case 'v2': | |
| case true: |
We should also update the jsdoc of enableNativePlugin option.
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.
I'm considering not adding the v2 option since the v2 implementation is still experimental and not fully stable. My current idea is to treat enableNativePlugin: true as enabling v2, while keeping v1 as the default behavior. 🤔
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.
What do you think? @sapphi-red
f627dd0 to
4c5f53a
Compare
51dfefc to
0b387c5
Compare
0b387c5 to
97a4abe
Compare
|
@sapphi-red Could you help me trigger the ecosystem CI? It seems I don’t have permission to do it. |
|
I found some issues in the Vite ecosystem, and I’ll address them later. |
Description
If you want to enable these new native plugins, you need to set
enableNativePlugin: true, the default value is'v2'. The v3 native plugins includeassetPlugin,assetImportMetaUrlPlugin,cssPlugin,htmlPlugin,htmlInlineProxyPlugin, improvednativeManifestPluginandnativeBuildImportAnalysisPlugin.Warning
We've identified cases in the third-party ecosystem where plugins invoke hooks of the
vite:cssorvite:css-postbuilt-in plugins, such asunocss/unocss,ArnaudBarre/downwind,privatenumber/vite-css-modules, andredfox-mx/vite-lit-css. After migrating to native plugins, we need to find appropriate solutions for these use cases. See https://github.com/search?q=vite%3Acss-post&type=code