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(),