import { defineConfig } from 'vite' import vue from '@vitejs/plugin-vue' // https://vite.dev/config/ export default defineConfig({ plugins: [vue()], server: { host: '0.0.0.0', // 允许局域网访问 port: 5173, // 端口号,可自定义 strictPort: false, // 端口被占用时自动尝试下一个 open: false, // 启动时不自动打开浏览器 }, base: '/geo-tools/', build: { rollupOptions: { output: { manualChunks: { 'vue-vendor': ['vue', 'vue-router'], 'geo-libs': ['@turf/area', '@turf/length', '@turf/helpers', 'proj4', 'gcoord'], 'ui-libs': ['lucide-vue-next', 'leaflet'], 'exceljs': ['exceljs'] } } } } })