border_Inspection/web/vite.config.js

35 lines
773 B
JavaScript
Raw Normal View History

2025-07-30 18:07:47 +08:00
import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
import path from 'path'
export default defineConfig({
plugins: [vue()],
2025-08-01 16:21:53 +08:00
server: {
host: '0.0.0.0', // 监听所有网络接口
port: 5173, // 默认端口
2025-08-06 15:56:07 +08:00
strictPort: true, // 如果端口被占用则退出
proxy: {
'/api': {
target: 'http://36.103.203.89:6789',
changeOrigin: true,
}
}
2025-08-01 16:21:53 +08:00
},
2025-07-30 18:07:47 +08:00
resolve: {
alias: {
'@': path.resolve(__dirname, './src'),
find: /^@dataview\/datav-vue3$/,
replacement: '@kjgl77/datav-vue3'
}
},
optimizeDeps: {
include: ['@kjgl77/datav-vue3']
},
css: {
preprocessorOptions: {
scss: {
additionalData: `@use "@/assets/styles/main" as *;`
}
}
}
})