File tree Expand file tree Collapse file tree 2 files changed +2
-5
lines changed
packages/vite/src/node/plugins Expand file tree Collapse file tree 2 files changed +2
-5
lines changed Original file line number Diff line number Diff line change @@ -118,7 +118,7 @@ export function definePlugin(config: ResolvedConfig): Plugin {
118118 return pattern
119119 }
120120
121- if ( config . experimental . enableNativePlugin === true && isBuild ) {
121+ if ( config . experimental . enableNativePlugin === true && isBundled ) {
122122 return {
123123 name : 'vite:define' ,
124124 options ( option ) {
Original file line number Diff line number Diff line change @@ -8,10 +8,7 @@ export const modulePreloadPolyfillId = 'vite/modulepreload-polyfill'
88const resolvedModulePreloadPolyfillId = '\0' + modulePreloadPolyfillId + '.js'
99
1010export function modulePreloadPolyfillPlugin ( config : ResolvedConfig ) : Plugin {
11- if (
12- config . experimental . enableNativePlugin === true &&
13- config . command === 'build'
14- ) {
11+ if ( config . experimental . enableNativePlugin === true && config . isBundled ) {
1512 return perEnvironmentPlugin (
1613 'native:modulepreload-polyfill' ,
1714 ( environment ) => {
You can’t perform that action at this time.
0 commit comments