vue3-vite自定义环境变量
链接:http://ggz.longpanda.top/article_detail?id=25
vue3-vite自定义环境变量
.env.[模式名]
例如: .env.development //在development模式下会读取该文件,变量名以VITE开头
# just a flag
ENV = 'development'
# base url
VITE_BASE_URL = 'http://47.116.140.26:8080/'
例如:.env.demo
"scripts": {
"dev": "vite",
"build": "vue-tsc --noEmit && vite build",
"demo": "vue-tsc --noEmit && vite build --mode demo",
"preview": "vite preview"
},