-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvue.config.js
49 lines (48 loc) · 1.16 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
const path = require('path');
var webpack = require("webpack");
const publicPath = '/';
module.exports = {
publicPath,
devServer: {
proxy: {
'/Svc': {
target: 'http://222.223.86.32:18081',
ws: true,
changeOrigin: true
}
}
},
// 生产环境是否生成 sourceMap 文件
productionSourceMap: false,
chainWebpack: (config) => {
config.resolve.alias.set('@', path.resolve(__dirname, 'src/')).set('vue$', 'vue/dist/vue.esm.js');
config.module
.rule('svg-icon')
.test(/\.(svg)(\?.*)?$/)
.include.add([path.resolve(__dirname, 'src/icons')])
.end()
.use('svg-sprite-loader')
.loader('svg-sprite-loader')
.options({
symbolId: 'icon-[name]',
});
config.module.rule('svg').exclude.add([path.resolve(__dirname, 'src/icons')]);
config.devtool('source-map');
},
pluginOptions: {
openlayers: {
preProcessor: "openlayers",
patterns: path.resolve(
__dirname,
"../node_modules/openlayers/dist/ol.js"
),
},
},
configureWebpack: {
plugins: [
new webpack.ProvidePlugin({
ol: "openlayers",
}),
],
},
};