From 96c000d2e990cb81d3eceb8f91c7e88a4f175725 Mon Sep 17 00:00:00 2001 From: zmj <1493694146@qq.com> Date: Sat, 1 Jun 2024 09:46:44 +0800 Subject: [PATCH] =?UTF-8?q?=E7=8E=AF=E5=A2=83=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package.json | 2 ++ src/config/index.ts | 1 - vite.config.ts | 4 +++- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index da2dc6b..f0e7627 100644 --- a/package.json +++ b/package.json @@ -4,6 +4,8 @@ "license": "MIT", "scripts": { "dev": "vite", + "local": "vite --mode loc", + "prod": "vite --mode production", "preview": "vite preview --port 4173", "build": "vite build && node scripts/release.mjs", "build:prod": "vite build --mode production", diff --git a/src/config/index.ts b/src/config/index.ts index 25827c9..f5f4c9d 100644 --- a/src/config/index.ts +++ b/src/config/index.ts @@ -2,7 +2,6 @@ const config = { terminal: 1, //终端 title: '后台管理系统', //网站默认标题 version: '1.8.0', //版本号 - // baseUrl: `${import.meta.env.VITE_APP_BASE_URL || ''}/`, //请求接口域名 baseUrl: `${import.meta.env.VITE_APP_BASE_URL || ''}/`, //请求接口域名 urlPrefix: 'adminapi', //请求默认前缀 timeout: 10 * 1000 //请求超时时长 diff --git a/vite.config.ts b/vite.config.ts index 766ed39..c31ada4 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -14,7 +14,9 @@ import vueSetupExtend from 'vite-plugin-vue-setup-extend' export default defineConfig({ base: '/admin/', server: { - host: '0.0.0.0' + host: '0.0.0.0', + open: true, + port: 8787, }, plugins: [ vue(),