Skip to content

Commit

Permalink
feat(plugin-compiler): 优化分包和插件编译的 getApp 注入逻辑,避免在支付宝小程序上的 externals 生…
Browse files Browse the repository at this point in the history
…效问题 (#70)
  • Loading branch information
lyfeyaj authored Jul 4, 2023
1 parent d91e972 commit be79063
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions packages/plugin-compiler/src/plugins/injectGetAppPlugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,12 @@ type ConcatSource = webpack.sources.ConcatSource

// 模块包装的所在函数的参数替换映射
const MODULE_FACTORY_ARGS_REPLACEMENTS = new Map([
[0, '__unused_webpack_module, __webpack_exports__, __webpack_require__'],
[1, '__webpack_exports__, __webpack_require__'],
[2, '__webpack_require__'],
[
0,
'__unused_webpack_module, __unused_webpack_exports__, __unused_webpack_require__'
],
[1, '__unused_webpack_exports__, __unused_webpack_require__'],
[2, '__unused_webpack_require__'],
[3, '']
])

Expand Down

0 comments on commit be79063

Please sign in to comment.