Skip to content

Commit

Permalink
fix(runner-utils): 修复 resolve 插件,fix #6720 (#6782)
Browse files Browse the repository at this point in the history
require.context 的情况下不使用多端文件判断逻辑
  • Loading branch information
Chen-jj authored Jun 23, 2020
1 parent 2c966a1 commit c5f77e8
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit c5f77e8

Please sign in to comment.