Skip to content

Commit

Permalink
fix: add specified umi version to defInfo by default
Browse files Browse the repository at this point in the history
  • Loading branch information
sorrycc committed Mar 18, 2021
1 parent c9ae5b3 commit 7662706
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions packages/preset-built-in/src/plugins/generateFiles/umi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,16 +22,19 @@ export default function (api: IApi) {
utils: { Mustache },
} = api;

const umiVersion = process.env.MFSU_USE_LATEST_UMI
? '3'
: process.env.UMI_VERSION;
api.addDepInfo(() => {
return [
{
name: '@umijs/runtime',
range: '3',
range: umiVersion,
alias: [runtimePath],
},
{
name: '@umijs/renderer-react',
range: '3',
range: umiVersion,
alias: [renderReactPath],
},
];
Expand Down

0 comments on commit 7662706

Please sign in to comment.