From c0e74e5f687b8f2bb308acb51cd94c31aea2808b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=BF=A0=20/=20green?= Date: Mon, 20 Jun 2022 00:23:04 +0900 Subject: [PATCH] fix(plugin-legacy): prevent esbuild injecting arrow function (#8660) --- packages/plugin-legacy/src/index.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/plugin-legacy/src/index.ts b/packages/plugin-legacy/src/index.ts index 0c9fb1c8c68d33..1a5e86e46019be 100644 --- a/packages/plugin-legacy/src/index.ts +++ b/packages/plugin-legacy/src/index.ts @@ -578,7 +578,8 @@ async function buildPolyfillChunk( plugins: [polyfillsPlugin(imports, excludeSystemJS)], build: { write: false, - target: false, + // if a value above 'es5' is set, esbuild injects helper functions which uses es2015 features + target: 'es5', minify, assetsDir, rollupOptions: {