geo/vite.config.js

19 lines
439 B
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
// https://vitejs.dev/config/
export default defineConfig({
plugins: [vue()],
define: {
// 解决ArcGIS API中的process.env问题
'process.env': {}
},
optimizeDeps: {
// 排除ArcGIS模块从预构建中因为它们已经是优化的
exclude: ['@arcgis/core']
},
server: {
// 允许从外部域加载资源
cors: true
}
})