Skip to content

Commit

Permalink
fix(preset-umi): chainWebpack hook args for ssr bundling (#12217)
Browse files Browse the repository at this point in the history
  • Loading branch information
PeachScript authored Mar 21, 2024
1 parent c25493e commit f03915a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/preset-umi/src/features/ssr/webpack/webpack.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,10 @@ export const build = async (api: IApi, opts: any) => {
bundlerOpts.watch = api.env === 'development';

// override chainWebpack
bundlerOpts.chainWebpack = async (memo: WebpackChain) => {
bundlerOpts.chainWebpack = async (memo: WebpackChain, opts: any) => {
const absOutputFile = absServerBuildPath(api);

await oChainWebpack(memo);
await oChainWebpack(memo, { ...opts, ssr: true });
memo.entryPoints.clear();
memo.entry('umi').add(resolve(api.paths.absTmpPath, 'umi.server.ts'));
memo.target('node');
Expand Down

0 comments on commit f03915a

Please sign in to comment.