border_Inspection/web/vite.config.js
2025-08-01 16:21:53 +08:00

29 lines
656 B
JavaScript

import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
import path from 'path'
export default defineConfig({
plugins: [vue()],
server: {
host: '0.0.0.0', // 监听所有网络接口
port: 5173, // 默认端口
strictPort: true // 如果端口被占用则退出
},
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 *;`
}
}
}
})