From c5f77e86b4522a711d5f06afbf5d80db92a3fa03 Mon Sep 17 00:00:00 2001 From: chenjiajian <798095202@qq.com> Date: Wed, 24 Jun 2020 01:29:43 +0800 Subject: [PATCH] =?UTF-8?q?fix(runner-utils):=20=E4=BF=AE=E5=A4=8D=20resol?= =?UTF-8?q?ve=20=E6=8F=92=E4=BB=B6=EF=BC=8Cfix=20#6720=20(#6782)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit require.context 的情况下不使用多端文件判断逻辑 --- packages/taro-runner-utils/src/resolve/MultiPlatformPlugin.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/taro-runner-utils/src/resolve/MultiPlatformPlugin.ts b/packages/taro-runner-utils/src/resolve/MultiPlatformPlugin.ts index 7c8bddd17d89..6ff3aaf07eae 100644 --- a/packages/taro-runner-utils/src/resolve/MultiPlatformPlugin.ts +++ b/packages/taro-runner-utils/src/resolve/MultiPlatformPlugin.ts @@ -37,7 +37,8 @@ export class MultiPlatformPlugin { .getHook(this.source) .tapAsync('MultiPlatformPlugin', (request, resolveContext, callback) => { const innerRequest: string = request.request || request.path - if (!innerRequest) return callback() + // request.directory will be true when is using require.context + if (!innerRequest || request.directory) return callback() if (!path.extname(innerRequest)) { let srcRequest: string