diff --git a/packages/vite/src/node/plugins/index.ts b/packages/vite/src/node/plugins/index.ts index 351827adc6c714..731f78f4237984 100644 --- a/packages/vite/src/node/plugins/index.ts +++ b/packages/vite/src/node/plugins/index.ts @@ -82,19 +82,21 @@ export async function resolvePlugins( }) : modulePreloadPolyfillPlugin(config) : null, - resolvePlugin( - { - root: config.root, - isProduction: config.isProduction, - isBuild, - packageCache: config.packageCache, - asSrc: true, - fsUtils: getFsUtils(config), - optimizeDeps: true, - externalize: isBuild && !!config.build.ssr, // TODO: should we do this for all environments? - }, - config.environments, - ), + enableNativePlugin + ? null + : resolvePlugin( + { + root: config.root, + isProduction: config.isProduction, + isBuild, + packageCache: config.packageCache, + asSrc: true, + fsUtils: getFsUtils(config), + optimizeDeps: true, + externalize: isBuild && !!config.build.ssr, // TODO: should we do this for all environments? + }, + config.environments, + ), htmlInlineProxyPlugin(config), cssPlugin(config), config.esbuild !== false