-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvue.config.js
118 lines (114 loc) · 2.85 KB
/
vue.config.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
const { defineConfig } = require('@vue/cli-service')
module.exports = defineConfig({
transpileDependencies: true
})
const CopyWebpackPlugin = require('copy-webpack-plugin')
const webpack = require('webpack')
const path = require('path')
let cesiumSource = './node_modules/cesium/Source'
let cesiumWorkers = '../Build/Cesium/Workers'
module.exports = {
// 基本路径 3.6之前的版本时 baseUrl
publicPath: "./",
// 输出文件目录
outputDir: "dist",
// eslint-loader 是否在保存的时候检查
lintOnSave: false,
// webpack-dev-server 相关配置
devServer: {
proxy: {
'/try': {
target: 'https://www.runoob.com',
ws: true,
changeOrigin: true
},
'/yuxi_DEM': {
target: 'http://yxgis2sim.hdec.com',
ws: true,
changeOrigin: true
},
'/iserver': {
target: 'http://yxgis2sim.hdec.com',
ws: true,
changeOrigin: true
},
'/testt': {
target: 'http://localhost:8081',
ws: true,
changeOrigin: true
},
// '/ismap-mvt-ShenSeDiTu1231erver': {
// target: 'http://gisct.ecidi.com/iserver/services',
// ws: true,
// changeOrigin: true
// },
'/map-mvt-ShenSeDiTu1231': {
target: 'http://gisct.ecidi.com/iserver/services',
ws: true,
changeOrigin: true
},
'/yuxiBasemap': {
target: 'http://yxgis2.hdec.com',
ws: true,
changeOrigin: true
},
'/geoserver': {
target: 'http://localhost:8088',
ws: true,
changeOrigin: true
},
'/UserController': {
target: 'http://localhost:8080',
ws: true,
changeOrigin: true
}
// '/foo': {
// target: '<other_url>'
// }
}
},
configureWebpack: {
output: {
sourcePrefix: ' '
},
amd: {
toUrlUndefined: true
},
resolve: {
alias: {
'vue$': 'vue/dist/vue.esm.js',
'@': path.resolve('src'),
'cesium': path.resolve(__dirname, cesiumSource)
}
},
plugins: [
new CopyWebpackPlugin({
patterns:[{
from: path.join(cesiumSource, cesiumWorkers),
to: 'Workers'
}]}),
new CopyWebpackPlugin({
patterns:[{
from: path.join(cesiumSource, 'Assets'),
to: 'Assets'
}]}),
new CopyWebpackPlugin({
patterns:[{
from: path.join(cesiumSource, 'Widgets'),
to: 'Widgets'
}]}),
new CopyWebpackPlugin({
patterns:[{
from: path.join(cesiumSource, 'ThirdParty/Workers'),
to: 'ThirdParty/Workers'
}]}),
new webpack.DefinePlugin({
CESIUM_BASE_URL: JSON.stringify('./')
})
],
module: {
unknownContextCritical: /^.\/.*$/,
unknownContextCritical: false
}
}
}