feat: #响应式 (#22)

* feat: #响应式

* fix: #兼容node 16

* feat: #接口代理

* fix: #延长超时时长到30秒

* fix: #for node 16

* fix: #node 16

* Update settings.json

* Update package.json

* Update index.vue

* Update Layout.vue

---------

Co-authored-by: Redon <790348264@qq.com>
This commit is contained in:
Yut
2023-02-15 14:01:42 +08:00
committed by GitHub
parent 79eeb51537
commit c617205a8c
7 changed files with 70 additions and 15 deletions

View File

@@ -1,8 +1,9 @@
import path from 'path'
import { defineConfig } from 'vite'
import { defineConfig, loadEnv } from 'vite'
import vue from '@vitejs/plugin-vue'
export default defineConfig(() => {
export default defineConfig((env) => {
const viteEnv = loadEnv(env.mode, process.cwd())
return {
resolve: {
alias: {
@@ -14,6 +15,13 @@ export default defineConfig(() => {
port: 1002,
host: '0.0.0.0',
open: false,
proxy: {
'/api': {
target: viteEnv.VITE_APP_API_BASE_URL,
changeOrigin: true, // 允许跨域
rewrite: path => path.replace('/api/', '/'),
},
},
},
build: {
reportCompressedSize: false,