Skip to content
This repository was archived by the owner on Mar 19, 2026. It is now read-only.
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"feed": "^5.1.0",
"gsap": "^3.13.0",
"markdown-it-image-size": "^15.0.1",
"oxc-minify": "^0.101.0",
"oxc-minify": "^0.102.0",
"vitepress": "^2.0.0-alpha.15",
"vitepress-plugin-group-icons": "^1.6.5",
"vitepress-plugin-llms": "^1.9.3",
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
"picocolors": "^1.1.1",
"playwright-chromium": "^1.57.0",
"prettier": "3.7.3",
"rolldown": "1.0.0-beta.53",
"rolldown": "1.0.0-beta.54",
"rollup": "^4.43.0",
"simple-git-hooks": "^2.13.1",
"tsx": "^4.21.0",
Expand Down
8 changes: 4 additions & 4 deletions packages/vite/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -82,12 +82,12 @@
},
"//": "READ CONTRIBUTING.md to understand what to put under deps vs. devDeps!",
"dependencies": {
"@oxc-project/runtime": "0.101.0",
"@oxc-project/runtime": "0.102.0",
"fdir": "^6.5.0",
"lightningcss": "^1.30.2",
"picomatch": "^4.0.3",
"postcss": "^8.5.6",
"rolldown": "1.0.0-beta.53",
"rolldown": "1.0.0-beta.54",
"tinyglobby": "^0.2.15"
},
"optionalDependencies": {
Expand All @@ -97,9 +97,9 @@
"@babel/parser": "^7.28.5",
"@jridgewell/remapping": "^2.3.5",
"@jridgewell/trace-mapping": "^0.3.31",
"@oxc-project/types": "0.101.0",
"@oxc-project/types": "0.102.0",
"@polka/compression": "^1.0.0-next.25",
"@rolldown/pluginutils": "1.0.0-beta.53",
"@rolldown/pluginutils": "1.0.0-beta.54",
"@rollup/plugin-alias": "^5.1.1",
"@rollup/plugin-commonjs": "^29.0.0",
"@rollup/plugin-dynamic-import-vars": "2.1.4",
Expand Down
13 changes: 8 additions & 5 deletions packages/vite/src/node/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -550,12 +550,13 @@ export interface ExperimentalOptions {
*
* - 'resolver' (deprecated, will be removed in v8 stable): Enable only the native resolver plugin.
* - 'v1' (will be deprecated, will be removed in v8 stable): Enable the first stable set of native plugins (including resolver).
* - true: Enable all native plugins (currently an alias of 'v1', it will map to a newer one in the future versions).
* - 'v2': Enable the improved dynamicImportVarsPlugin and importGlobPlugin.
* - true: Enable all native plugins (currently an alias of 'v2', it will map to a newer one in the future versions).
*
* @experimental
* @default 'v1'
* @default 'v2'
*/
enableNativePlugin?: boolean | 'resolver' | 'v1'
enableNativePlugin?: boolean | 'resolver' | 'v1' | 'v2'
}

export interface LegacyOptions {
Expand Down Expand Up @@ -768,7 +769,7 @@ const configDefaults = Object.freeze({
importGlobRestoreExtension: false,
renderBuiltUrl: undefined,
hmrPartialAccept: false,
enableNativePlugin: process.env._VITE_TEST_JS_PLUGIN ? false : 'v1',
enableNativePlugin: process.env._VITE_TEST_JS_PLUGIN ? false : 'v2',
},
future: {
removePluginHookHandleHotUpdate: undefined,
Expand Down Expand Up @@ -2060,8 +2061,10 @@ function resolveNativePluginEnabledLevel(
case 'resolver':
return 0
case 'v1':
case true:
return 1
case 'v2':
case true:
return 2
case false:
return -1
default:
Expand Down
6 changes: 6 additions & 0 deletions packages/vite/src/node/plugins/dynamicImportVars.ts
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,12 @@ export function dynamicImportVarsPlugin(config: ResolvedConfig): Plugin {
resolver(id, importer) {
return resolve(environment, id, importer)
},
isV2:
config.nativePluginEnabledLevel >= 2
? {
sourcemap: !!environment.config.build.sourcemap,
}
: undefined,
})
})
}
Expand Down
6 changes: 6 additions & 0 deletions packages/vite/src/node/plugins/importMetaGlob.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,12 @@ export function importGlobPlugin(config: ResolvedConfig): Plugin {
return nativeImportGlobPlugin({
root: config.root,
restoreQueryExtension: config.experimental.importGlobRestoreExtension,
isV2:
config.nativePluginEnabledLevel >= 2
? {
sourcemap: !!config.build.sourcemap,
}
: undefined,
})
}

Expand Down
2 changes: 1 addition & 1 deletion playground/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@
"convert-source-map": "^2.0.0",
"css-color-names": "^1.0.1",
"kill-port": "^1.6.1",
"rolldown": "1.0.0-beta.53"
"rolldown": "1.0.0-beta.54"
}
}
Loading
Loading