Skip to content
This repository has been archived by the owner on Mar 7, 2024. It is now read-only.

Commit

Permalink
fix: 修复 configWebpack 无法修改 plugins 里配置的问题 (#1356)
Browse files Browse the repository at this point in the history
  • Loading branch information
noyobo committed Nov 4, 2020
1 parent 9f65ba9 commit 6308a8e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions packages/remax-cli/src/build/webpack/config.mini.ts
Original file line number Diff line number Diff line change
Expand Up @@ -218,12 +218,12 @@ export default function webpackConfig(api: API, options: Options, target: Platfo
},
};

api.configWebpack(context);

if (typeof options.configWebpack === 'function') {
options.configWebpack(context);
}

api.configWebpack(context);

const externals = config.get('externals');
const runtimeOptionsExternal = {
'/__remax_runtime_options__': `require('/__remax_runtime_options__')`,
Expand Down
4 changes: 2 additions & 2 deletions packages/remax-cli/src/build/webpack/config.web.ts
Original file line number Diff line number Diff line change
Expand Up @@ -123,12 +123,12 @@ export default function webpackConfig(api: API, options: Options): webpack.Confi
},
};

api.configWebpack(context);

if (typeof options.configWebpack === 'function') {
options.configWebpack(context);
}

api.configWebpack(context);

const devServer = config.get('devServer') || {};

config.devServer.publicPath(publicPath);
Expand Down

1 comment on commit 6308a8e

@vercel
Copy link

@vercel vercel bot commented on 6308a8e Nov 4, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.