diff --git a/packages/webpack-plugin/lib/resolver/PackageEntryPlugin.js b/packages/webpack-plugin/lib/resolver/PackageEntryPlugin.js index d85fbe92e4..2d1770eb09 100644 --- a/packages/webpack-plugin/lib/resolver/PackageEntryPlugin.js +++ b/packages/webpack-plugin/lib/resolver/PackageEntryPlugin.js @@ -35,7 +35,7 @@ module.exports = class PackageEntryPlugin { relativePath: './' + toPosix(relativePath), miniprogram: true }) - if (obj.path === request.path) return callback() + if (obj.path === resourcePath) return callback() resolver.doResolve(target, obj, 'add miniprogram dist: ' + miniprogram, resolveContext, callback) }) }