fix: build 构建参数异常问题

This commit is contained in:
bac-joker 2021-04-11 19:12:48 +08:00
parent bba04c7e5d
commit cc8c392e62
4 changed files with 9 additions and 2 deletions

View File

@ -0,0 +1,8 @@
// .fes.js 只负责管理编译时配置只能使用plain Object
export default {
request: {
base: '/api'
}
};

View File

@ -4,6 +4,7 @@
"description": "fes 移动端项目模版",
"scripts": {
"build": "fes build",
"prod": "FES_ENV=prod fes build",
"dev": "fes dev"
},
"keywords": [

View File

@ -29,7 +29,6 @@ const args = yParser(rawArgv);
(async () => {
try {
const command = args._[0];
process.env.FES_ENV = args.mode || '';
if (command === 'dev') {
const child = fork({
scriptPath: require.resolve('./forkedDev')

View File

@ -30,7 +30,6 @@ function onSignal(signal, service) {
(async () => {
try {
process.env.NODE_ENV = 'development';
process.env.FES_ENV = args.mode || '';
const service = new Service({
cwd: getCwd(),
pkg: getPkg(process.cwd()),