Skip to content

Commit

Permalink
chore: only override ie
Browse files Browse the repository at this point in the history
  • Loading branch information
fz6m committed Nov 14, 2023
1 parent 3668574 commit b597c5d
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions packages/preset-umi/src/features/legacy/legacy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -132,10 +132,15 @@ export default (api: IApi) => {
memo.cssMinifier = CSSMinifier.cssnano;

// specify a low-compatibility target for babel transform
const ieTarget = userConfig.targets?.ie || api.config.targets?.ie || 11;
memo.targets = {
ie: 11,
...userConfig.targets,
ie: ieTarget,
};
logger.info(
`${legacyModeLabel} set compatiable target to ${chalk.yellow(
`ie ${ieTarget}`,
)}`,
);

logger.info(
`${legacyModeLabel} is enabled, we automatically modify the ${[
Expand Down

0 comments on commit b597c5d

Please sign in to comment.