环境配置

This commit is contained in:
zmj 2024-06-01 09:46:44 +08:00
parent f1962421ef
commit 96c000d2e9
3 changed files with 5 additions and 2 deletions

View File

@ -4,6 +4,8 @@
"license": "MIT", "license": "MIT",
"scripts": { "scripts": {
"dev": "vite", "dev": "vite",
"local": "vite --mode loc",
"prod": "vite --mode production",
"preview": "vite preview --port 4173", "preview": "vite preview --port 4173",
"build": "vite build && node scripts/release.mjs", "build": "vite build && node scripts/release.mjs",
"build:prod": "vite build --mode production", "build:prod": "vite build --mode production",

View File

@ -2,7 +2,6 @@ const config = {
terminal: 1, //终端 terminal: 1, //终端
title: '后台管理系统', //网站默认标题 title: '后台管理系统', //网站默认标题
version: '1.8.0', //版本号 version: '1.8.0', //版本号
// baseUrl: `${import.meta.env.VITE_APP_BASE_URL || ''}/`, //请求接口域名
baseUrl: `${import.meta.env.VITE_APP_BASE_URL || ''}/`, //请求接口域名 baseUrl: `${import.meta.env.VITE_APP_BASE_URL || ''}/`, //请求接口域名
urlPrefix: 'adminapi', //请求默认前缀 urlPrefix: 'adminapi', //请求默认前缀
timeout: 10 * 1000 //请求超时时长 timeout: 10 * 1000 //请求超时时长

View File

@ -14,7 +14,9 @@ import vueSetupExtend from 'vite-plugin-vue-setup-extend'
export default defineConfig({ export default defineConfig({
base: '/admin/', base: '/admin/',
server: { server: {
host: '0.0.0.0' host: '0.0.0.0',
open: true,
port: 8787,
}, },
plugins: [ plugins: [
vue(), vue(),