36 lines
957 B
TypeScript
36 lines
957 B
TypeScript
import { defineConfig } from 'vite'
|
|
import vue from '@vitejs/plugin-vue'
|
|
import { VitePWA } from 'vite-plugin-pwa'
|
|
|
|
export default defineConfig({
|
|
plugins: [
|
|
vue(),
|
|
VitePWA({
|
|
registerType: 'autoUpdate',
|
|
manifest: {
|
|
name: '随身助手',
|
|
short_name: '随身助手',
|
|
description: '对话 · 智能体 · 项目开发 · 随身可用',
|
|
theme_color: '#1989fa',
|
|
background_color: '#f7f8fa',
|
|
display: 'standalone',
|
|
start_url: '/',
|
|
icons: [{ src: '/icon.svg', sizes: 'any', type: 'image/svg+xml', purpose: 'any' }],
|
|
},
|
|
}),
|
|
],
|
|
server: {
|
|
host: '0.0.0.0',
|
|
port: 16081,
|
|
proxy: {
|
|
'/api': { target: 'http://127.0.0.1:16080', changeOrigin: true, ws: true },
|
|
'/uploads': { target: 'http://127.0.0.1:16080', changeOrigin: true },
|
|
},
|
|
},
|
|
build: {
|
|
outDir: '../backend/static',
|
|
emptyOutDir: true,
|
|
chunkSizeWarningLimit: 1200,
|
|
},
|
|
})
|