project init
This commit is contained in:
21
src/config/env.js
Normal file
21
src/config/env.js
Normal file
@@ -0,0 +1,21 @@
|
||||
// 配置编译环境和线上环境之间的切换
|
||||
|
||||
let baseUrl = '';
|
||||
let iconfontVersion = ['567566_pwc3oottzol', '1066523_6bvkeuqao36', '1939523_a2ybsew93wu'];
|
||||
let iconfontUrl = `//at.alicdn.com/t/font_$key.css`;
|
||||
let codeUrl = `${baseUrl}/code`
|
||||
const env = process.env
|
||||
if (env.NODE_ENV == 'development') {
|
||||
baseUrl = ``; // 开发环境地址
|
||||
} else if (env.NODE_ENV == 'production') {
|
||||
baseUrl = ``; //生产环境地址
|
||||
} else if (env.NODE_ENV == 'test') {
|
||||
baseUrl = ``; //测试环境地址
|
||||
}
|
||||
export {
|
||||
baseUrl,
|
||||
iconfontUrl,
|
||||
iconfontVersion,
|
||||
codeUrl,
|
||||
env
|
||||
}
|
||||
Reference in New Issue
Block a user