Skip to content

Commit

Permalink
fix: use jsx/runtime only for react 17 and above, again
Browse files Browse the repository at this point in the history
  • Loading branch information
sorrycc committed Apr 3, 2024
1 parent 49cd673 commit 8e006e2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/preset-umi/src/commands/dev/getBabelOpts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { IApi } from '../../types';

export async function getBabelOpts(opts: { api: IApi }) {
// TODO: 支持用户自定义
const shouldUseAutomaticRuntime = semver.gte(opts.api.appData.react.version, '16.14.0');
const shouldUseAutomaticRuntime = semver.gte(opts.api.appData.react.version, '17.0.0');
const babelPresetOpts = await opts.api.applyPlugins({
key: 'modifyBabelPresetOpts',
initialValue: {
Expand Down

0 comments on commit 8e006e2

Please sign in to comment.