修改默认env

This commit is contained in:
niyyzf 2024-08-03 14:24:05 +08:00
parent 9bcfd58062
commit c90f480fab
5 changed files with 4 additions and 3 deletions

View File

@ -1 +1 @@
NUXT_API_URL="https://backend.xn--7p0a.site" NUXT_API_URL="127.0.0.1:5000"

View File

@ -1 +0,0 @@
NUXT_API_URL="http://192.168.1.22:5000"

1
web/.env.yuan Normal file
View File

@ -0,0 +1 @@
NUXT_API_URL="https://backend.xn--7p0a.site"

View File

@ -80,7 +80,7 @@ export default defineNuxtConfig({
runtimeConfig: { runtimeConfig: {
baseUrl: '', public: { baseUrl: '', public: {
apiBase: '/Api', baseUrl: process.env.NUXT_API_URL apiBase: '/Api', baseUrl: import.meta.env.NUXT_API_URL,
} }
}, },

View File

@ -4,6 +4,7 @@
"type": "module", "type": "module",
"scripts": { "scripts": {
"build": "nuxt build", "build": "nuxt build",
"build:yuan": "nuxt build --dotenv .env.yuan",
"dev": "nuxt dev --dotenv .env.development", "dev": "nuxt dev --dotenv .env.development",
"generate": "nuxt generate", "generate": "nuxt generate",
"preview": "nuxt preview", "preview": "nuxt preview",