From 9f344bfa89d8b9c6d21ffdffd50c37a7053215ae Mon Sep 17 00:00:00 2001 From: Florian Dreier Date: Sat, 12 Jun 2021 11:19:28 +0200 Subject: [PATCH] fix: don't force polyfillDynamicImport if renderLegacyChunks is false (#3695) --- packages/plugin-legacy/index.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/plugin-legacy/index.js b/packages/plugin-legacy/index.js index 3bba50352367ff..a5c65175b8d06c 100644 --- a/packages/plugin-legacy/index.js +++ b/packages/plugin-legacy/index.js @@ -76,7 +76,9 @@ function viteLegacyPlugin(options = {}) { if (!config.build) { config.build = {} } - config.build.polyfillDynamicImport = true + if (genLegacy) { + config.build.polyfillDynamicImport = true + } } }