From c7fc1d4a532eae7b519bd70c6eba701e23b0635a Mon Sep 17 00:00:00 2001 From: dragonHandsome <61896951+dragonHandsome@users.noreply.github.com> Date: Mon, 16 May 2022 02:51:02 +0800 Subject: [PATCH] fix(plugin-legacy): fail to get the fileName (#5250) --- packages/plugin-legacy/src/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/plugin-legacy/src/index.ts b/packages/plugin-legacy/src/index.ts index 5fedb716f04f86..d107a2d66ac619 100644 --- a/packages/plugin-legacy/src/index.ts +++ b/packages/plugin-legacy/src/index.ts @@ -591,7 +591,7 @@ async function buildPolyfillChunk( } // add the chunk to the bundle - bundle[polyfillChunk.name] = polyfillChunk + bundle[polyfillChunk.fileName] = polyfillChunk } const polyfillId = '\0vite/legacy-polyfills'