Skip to content

Commit

Permalink
fix(preset-umi): modifyHTML hook oom in large static site app (#12215)
Browse files Browse the repository at this point in the history
  • Loading branch information
PeachScript authored Mar 21, 2024
1 parent eb3ea75 commit aa1f9bf
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 aa1f9bf

Please sign in to comment.