@@ -134,7 +134,7 @@ function viteLegacyPlugin(options: Options = {}): Plugin[] {
134
134
config . build ,
135
135
'es' ,
136
136
opts ,
137
- options . externalSystemJS
137
+ true
138
138
)
139
139
return
140
140
}
@@ -566,7 +566,7 @@ async function buildPolyfillChunk(
566
566
buildOptions : BuildOptions ,
567
567
format : 'iife' | 'es' ,
568
568
rollupOutputOptions : NormalizedOutputOptions ,
569
- externalSystemJS ?: boolean
569
+ excludeSystemJS ?: boolean
570
570
) {
571
571
let { minify, assetsDir } = buildOptions
572
572
minify = minify ? 'terser' : false
@@ -575,7 +575,7 @@ async function buildPolyfillChunk(
575
575
root : path . dirname ( fileURLToPath ( import . meta. url ) ) ,
576
576
configFile : false ,
577
577
logLevel : 'error' ,
578
- plugins : [ polyfillsPlugin ( imports , externalSystemJS ) ] ,
578
+ plugins : [ polyfillsPlugin ( imports , excludeSystemJS ) ] ,
579
579
build : {
580
580
write : false ,
581
581
target : false ,
@@ -614,7 +614,7 @@ const polyfillId = '\0vite/legacy-polyfills'
614
614
615
615
function polyfillsPlugin (
616
616
imports : Set < string > ,
617
- externalSystemJS ?: boolean
617
+ excludeSystemJS ?: boolean
618
618
) : Plugin {
619
619
return {
620
620
name : 'vite:legacy-polyfills' ,
@@ -627,7 +627,7 @@ function polyfillsPlugin(
627
627
if ( id === polyfillId ) {
628
628
return (
629
629
[ ...imports ] . map ( ( i ) => `import "${ i } ";` ) . join ( '' ) +
630
- ( externalSystemJS ? '' : `import "systemjs/dist/s.min.js";` )
630
+ ( excludeSystemJS ? '' : `import "systemjs/dist/s.min.js";` )
631
631
)
632
632
}
633
633
}
0 commit comments