Skip to content

Conversation

@shulaoda
Copy link
Member

@shulaoda shulaoda commented Nov 4, 2025

Description

If you want to enable these new native plugins, you need to set enableNativePlugin: true, the default value is 'v1'.

The v2 native plugins include assetPlugin, assetImportMetaUrlPlugin, cssPlugin, htmlPlugin, and htmlInlineProxyPlugin. In addition, the v2 update also improves nativeBuildImportAnalysisPlugin and nativeManifestPlugin.

Note that if you need to bundle workers, there may be issues under v2, as we are currently in the process of native-ifying the worker-related plugins.

@shulaoda shulaoda marked this pull request as draft November 4, 2025 15:57
@shulaoda shulaoda force-pushed the 10-20-stable-v2-native-plugins branch 2 times, most recently from ecc5731 to 165a101 Compare November 5, 2025 10:03
@shulaoda shulaoda force-pushed the 10-20-stable-v2-native-plugins branch 12 times, most recently from 097a16d to 747c24e Compare November 17, 2025 01:01
@shulaoda shulaoda force-pushed the 10-20-stable-v2-native-plugins branch 7 times, most recently from ce51c11 to 9ee6920 Compare November 26, 2025 09:41
@shulaoda shulaoda force-pushed the 10-20-stable-v2-native-plugins branch 6 times, most recently from dba3281 to d6b9c56 Compare December 3, 2025 01:14
@shulaoda shulaoda force-pushed the 10-20-stable-v2-native-plugins branch from d6b9c56 to 6eddf7b Compare December 3, 2025 01:21
@shulaoda shulaoda force-pushed the 10-20-stable-v2-native-plugins branch from 6eddf7b to 689f9ba Compare December 3, 2025 01:23
renderBuiltUrl: undefined,
hmrPartialAccept: false,
enableNativePlugin: process.env._VITE_TEST_JS_PLUGIN ? false : 'v1',
enableNativePlugin: process.env._VITE_TEST_JS_PLUGIN ? false : true,
Copy link
Member Author

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.

@shulaoda shulaoda force-pushed the 10-20-stable-v2-native-plugins branch from 689f9ba to 122013a Compare December 3, 2025 01:42
@shulaoda shulaoda marked this pull request as ready for review December 3, 2025 01:52
@shulaoda shulaoda requested a review from sapphi-red December 3, 2025 01:52
case 'v1':
case true:
return 1
case true:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
case true:
case 'v2':
case true:

We should also update the jsdoc of enableNativePlugin option.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm considering adding a v2 option since the v2 implementation is still experimental and not fully stabilized. My current idea is to treat enableNativePlugin: true as enabling v2, while the default behavior continues to use v1. 🤔

@shulaoda shulaoda force-pushed the 10-20-stable-v2-native-plugins branch 2 times, most recently from f627dd0 to 4c5f53a Compare December 3, 2025 07:26
@shulaoda shulaoda requested a review from sapphi-red December 3, 2025 07:26
@shulaoda shulaoda force-pushed the 10-20-stable-v2-native-plugins branch 2 times, most recently from 37f1886 to 51dfefc Compare December 3, 2025 07:29
@shulaoda shulaoda force-pushed the 10-20-stable-v2-native-plugins branch from 51dfefc to 0b387c5 Compare December 3, 2025 07:32
@shulaoda shulaoda marked this pull request as draft December 3, 2025 07:39
@sapphi-red

This comment was marked as off-topic.

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.

3 participants