- 更新 npm 依赖 (package.json) - 更新路由配置 (router/index.js) - 更新 Vite 构建配置 (vite.config.js) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
26 lines
436 B
JavaScript
26 lines
436 B
JavaScript
import { defineConfig } from 'vite'
|
|
import vue from '@vitejs/plugin-vue'
|
|
import { resolve } from 'path'
|
|
|
|
export default defineConfig({
|
|
plugins: [vue()],
|
|
resolve: {
|
|
alias: {
|
|
'@': resolve(__dirname, 'src')
|
|
}
|
|
},
|
|
server: {
|
|
host: '0.0.0.0',
|
|
port: 3000,
|
|
proxy: {
|
|
'/api': {
|
|
target: 'http://localhost:8000',
|
|
changeOrigin: true
|
|
}
|
|
}
|
|
},
|
|
build: {
|
|
assetsDir: 'assets'
|
|
}
|
|
})
|