Skip to content

Commit c0e74e5

Browse files
authored
fix(plugin-legacy): prevent esbuild injecting arrow function (#8660)
1 parent 3b41a8e commit c0e74e5

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

packages/plugin-legacy/src/index.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -578,7 +578,8 @@ async function buildPolyfillChunk(
578578
plugins: [polyfillsPlugin(imports, excludeSystemJS)],
579579
build: {
580580
write: false,
581-
target: false,
581+
// if a value above 'es5' is set, esbuild injects helper functions which uses es2015 features
582+
target: 'es5',
582583
minify,
583584
assetsDir,
584585
rollupOptions: {

0 commit comments

Comments
 (0)