From ccaddca6b44bd5d98f3c392d6424f1560f4bbae0 Mon Sep 17 00:00:00 2001 From: jeremywu <15975785+JeremyWuuuuu@users.noreply.github.com> Date: Sun, 19 Sep 2021 20:23:00 +0800 Subject: [PATCH] fix(build): full bundle transform error (#3504) - Prevent transformer to transform @element-plus/icons --- build/rollup.plugin.entry.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/build/rollup.plugin.entry.ts b/build/rollup.plugin.entry.ts index 30e38a0a67..04b1f09550 100644 --- a/build/rollup.plugin.entry.ts +++ b/build/rollup.plugin.entry.ts @@ -8,11 +8,11 @@ export default function entryPlugin(): Plugin { if (id.includes('packages')) { return { code: code.replace( - /@element-plus\//g, + /@element-plus\/(components|directives|utils|hooks|tokens|locale)/g, `${path.relative( path.dirname(id), path.resolve(__dirname, '../packages') - )}/` + )}/$1` ), map: null, }