study umi of mutiple environment
Zhangwuji
Posted on May 5, 2024
first you must install thec command
npm i cross-env -g
then you can use
"pre": "cross-env UMI_ENV=pre umi dev",
"build": "cross-env UMI_ENV=proo umi build",
if you config as below; umi will load umirc.${UMI_ENV}.ts
But it will load umirc.prod.ts as you run umi build;
umi will merge umirc.prod.ts and umirc.ts width umirc.prod.ts as the main one;
you can regard
umirc.ts
as the default configrable file; it has low priority
💖 💪 🙅 🚩
Zhangwuji
Posted on May 5, 2024
Join Our Newsletter. No Spam, Only the good stuff.
Sign up to receive the latest update from our blog.