study umi of mutiple environment | DevsDay.ru

IT-блоги study umi of mutiple environment

dev.to 5 мая 2024 г. Zhangwuji


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

Image description

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

Источник: dev.to

Наш сайт является информационным посредником. Сообщить о нарушении авторских прав.