From d2a51ca4eda2ca9f99d9a066836d76d2253cfc24 Mon Sep 17 00:00:00 2001 From: Florian Dreier Date: Sun, 27 Jun 2021 00:18:46 +0200 Subject: [PATCH] fix: don't force polyfillDynamicImport if renderLegacyChunks is false (#3695) (#3774) --- 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 5ef810d212da11..d2ae6fb8f9d809 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 + } } }