1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556 |
- import * as path from "path";
- const resolve = (dir) => path.resolve(__dirname, dir);
- import { fileURLToPath, URL } from 'node:url'
- import { defineConfig } from 'vite'
- import vue from '@vitejs/plugin-vue'
- export default defineConfig({
- server:{
- cors: true,
- resolve: {
- alias: {
-
- '@arcgis/core': path.resolve(__dirname, 'node_modules/@arcgis/core')
- }
- },
- proxy: {
- '/api': {
-
- target: 'http://10.90.9.143:9252/',
-
- secure: false,
- ws: true,
-
- changeOrigin: true,
- rewrite: (path) => path.replace(/^\/api/, '')
- },
- '/zwapi': {
-
- target: 'https://cimweb.zjw.sh.cegn.cn:2008/',
-
-
- secure: false,
- ws: true,
-
- changeOrigin: true,
- rewrite: (path) => path.replace(/^\/zwapi/, '')
- },
- '/netapi': {
-
- target: 'http://172.16.8.44:9250/low-altitude/',
-
-
- secure: false,
- ws: true,
-
- changeOrigin: true,
- rewrite: (path) => path.replace(/^\/netapi/, '')
- },
- }
- },
- plugins: [vue()],
- base:'/map-tool-widget/',
- publicDir: resolve('static'),
- })
|