diff --git a/.env.vercel b/.env.vercel deleted file mode 100644 index 79b6c0a7..00000000 --- a/.env.vercel +++ /dev/null @@ -1 +0,0 @@ -VITE_HTTP_ENV=VERCEL diff --git a/package.json b/package.json index 4d95ad83..af79c469 100644 --- a/package.json +++ b/package.json @@ -4,10 +4,10 @@ "scripts": { "dev": "vite", "dev:prod": "vite --mode production", - "dev:vercel": "vite --mode vercel", + "dev:staging": "vite --mode staging", "build": "vue-tsc --noEmit --skipLibCheck && vite build", "build:dev": "vue-tsc --noEmit --skipLibCheck && vite build --mode development", - "build:vercel": "vue-tsc --noEmit --skipLibCheck && vite build --mode vercel", + "build:staging": "vue-tsc --noEmit --skipLibCheck && vite build --mode staging", "serve": "vite preview", "lint": "eslint ./src --ext .vue,.js,jsx,.ts,tsx", "lint:fix": "eslint --fix ./src --ext .vue,.js,jsx,.ts,tsx", diff --git a/src/router/setup.ts b/src/router/setup.ts index b7bbc071..4036669f 100644 --- a/src/router/setup.ts +++ b/src/router/setup.ts @@ -4,10 +4,10 @@ import { routes } from './routes'; import createRouterGuide from './permission'; /** 用于部署vercel托管服务 */ -const isVercel = import.meta.env.VITE_HTTP_ENV === 'VERCEL'; +const isStaging = import.meta.env.VITE_HTTP_ENV === 'STAGING'; export const router = createRouter({ - history: isVercel ? createWebHashHistory() : createWebHistory(), + history: isStaging ? createWebHashHistory() : createWebHistory(), routes });