From a060a51bfa284f59196fec572aa78bfd0798eb1f Mon Sep 17 00:00:00 2001 From: fxy060608 Date: Thu, 11 Jun 2020 14:21:34 +0800 Subject: [PATCH] fix(mp): Match the root path of the sub-package exactly (question/99076) --- packages/webpack-uni-mp-loader/lib/plugin/index-new.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/webpack-uni-mp-loader/lib/plugin/index-new.js b/packages/webpack-uni-mp-loader/lib/plugin/index-new.js index 3254d97d8..7817fc4e7 100644 --- a/packages/webpack-uni-mp-loader/lib/plugin/index-new.js +++ b/packages/webpack-uni-mp-loader/lib/plugin/index-new.js @@ -44,7 +44,7 @@ function addSubPackagesRequire (compilation) { assetsKeys.forEach(name => { if ( path.extname(name) === '.js' && - name.indexOf(root) === 0 && + name.indexOf(root + '/') === 0 && name !== subPackageVendorPath ) { const source = -- GitLab