Skip to content

Commit

Permalink
fix: webpack-uni-mp-loader should support nested node_modules
Browse files Browse the repository at this point in the history
  • Loading branch information
yangyuan committed Aug 29, 2023
1 parent 1ceeb34 commit afe60ff
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/webpack-uni-mp-loader/lib/shared.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,9 @@ function resolve (source) {

function restoreNodeModules (str) {
if (process.env.UNI_PLATFORM === 'mp-alipay') {
str = str.replace('node-modules/npm-scope-', 'node-modules/@')
str = str.replaceAll('node-modules/npm-scope-', 'node-modules/@')
}
str = str.replace('node-modules', 'node_modules')
str = str.replaceAll('node-modules', 'node_modules')
return str
}

Expand Down

0 comments on commit afe60ff

Please sign in to comment.