Skip to content

Commit

Permalink
fix:修改enableRequireAsync的定义
Browse files Browse the repository at this point in the history
  • Loading branch information
Blackgan3 committed Jul 26, 2023
1 parent 9c15f49 commit 1a461ce
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions packages/webpack-plugin/lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,6 @@ class MpxWebpackPlugin {
options.partialCompile = options.mode !== 'web' && options.partialCompile
options.retryRequireAsync = options.retryRequireAsync || false
options.enableAliRequireAsync = options.enableAliRequireAsync || false
options.enableRequireAsync = options.mode === 'wx' || (options.mode === 'ali' && options.enableAliRequireAsync)
this.options = options
// Hack for buildDependencies
const rawResolveBuildDependencies = FileSystemInfo.prototype.resolveBuildDependencies
Expand Down Expand Up @@ -595,7 +594,7 @@ class MpxWebpackPlugin {
useRelativePath: this.options.useRelativePath,
removedChunks: [],
forceProxyEventRules: this.options.forceProxyEventRules,
enableRequireAsync: this.options.enableRequireAsync,
enableRequireAsync: this.options.mode === 'wx' || (this.options.mode === 'ali' && this.options.enableAliRequireAsync),
pathHash: (resourcePath) => {
if (this.options.pathHashMode === 'relative' && this.options.projectRoot) {
return hash(path.relative(this.options.projectRoot, resourcePath))
Expand Down

0 comments on commit 1a461ce

Please sign in to comment.