Skip to content

Commit

Permalink
fix(preset-umi): modifyHTML hook oom in large static site app
Browse files Browse the repository at this point in the history
  • Loading branch information
PeachScript committed Mar 19, 2024
1 parent 8bfd4c7 commit 2cb6c0f
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions packages/preset-umi/src/commands/dev/getMarkupArgs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@ export async function getMarkupArgs(opts: { api: IApi }) {
let $ = cheerio.load(memo, {
// @ts-ignore
decodeEntities: false,
// reduce memory overhead, to avoid oom in antd site with `exportStatic: {}`
_useHtmlParser2: true,
});
$ = await opts.api.applyPlugins({
key: 'modifyHTML',
Expand Down

0 comments on commit 2cb6c0f

Please sign in to comment.