From f26bf87bb807367b3e761560813676efbf78da8f Mon Sep 17 00:00:00 2001 From: wuchangming Date: Thu, 7 Apr 2022 15:29:38 +0800 Subject: [PATCH 1/2] =?UTF-8?q?fix(mini-runner):=20=E4=BF=AE=E5=A4=8D=20@b?= =?UTF-8?q?abel/parser=20=E4=B8=8E=20acron=20=E5=85=B3=E4=BA=8E=E5=8A=A8?= =?UTF-8?q?=E6=80=81=20`import()`=20=E8=A7=A3=E6=9E=90=E7=B1=BB=E5=9E=8B?= =?UTF-8?q?=E4=B8=8D=E4=B8=80=E8=87=B4=E5=AF=BC=E8=87=B4=E7=9A=84=E6=8A=A5?= =?UTF-8?q?=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../taro-mini-runner/src/plugins/TaroNormalModulesPlugin.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/taro-mini-runner/src/plugins/TaroNormalModulesPlugin.ts b/packages/taro-mini-runner/src/plugins/TaroNormalModulesPlugin.ts index d99143bd056c..ffe7066caeea 100644 --- a/packages/taro-mini-runner/src/plugins/TaroNormalModulesPlugin.ts +++ b/packages/taro-mini-runner/src/plugins/TaroNormalModulesPlugin.ts @@ -63,6 +63,8 @@ export default class TaroNormalModulesPlugin { .filter(p => p.type === 'Property' && p.key.type === 'Identifier' && p.key.name !== 'children') .forEach(p => attrs.add(p.key.name)) } + }, { + ...walk.base, Import: () => {} }) }) }) From 822c7288266239ed041c761be2b45133979ca953 Mon Sep 17 00:00:00 2001 From: wuchangming Date: Thu, 7 Apr 2022 15:53:49 +0800 Subject: [PATCH 2/2] =?UTF-8?q?fix(mini-runner):=20=E4=BC=98=E5=8C=96?= =?UTF-8?q?=E5=A4=84=E7=90=86=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../taro-mini-runner/src/plugins/TaroNormalModulesPlugin.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/taro-mini-runner/src/plugins/TaroNormalModulesPlugin.ts b/packages/taro-mini-runner/src/plugins/TaroNormalModulesPlugin.ts index ffe7066caeea..02c456450f26 100644 --- a/packages/taro-mini-runner/src/plugins/TaroNormalModulesPlugin.ts +++ b/packages/taro-mini-runner/src/plugins/TaroNormalModulesPlugin.ts @@ -64,7 +64,7 @@ export default class TaroNormalModulesPlugin { .forEach(p => attrs.add(p.key.name)) } }, { - ...walk.base, Import: () => {} + ...walk.base, Import: walk.base.Import || (() => {}) }) }) })