forked from luoyp123/cesium-measure
-
Notifications
You must be signed in to change notification settings - Fork 0
/
vue.config.js
42 lines (39 loc) · 960 Bytes
/
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
const path = require('path');
function resolve(dir) {
return path.join(__dirname, dir);
}
module.exports = {
publicPath: process.env.NODE_ENV==='development'? './':'../dist',
assetsDir: 'static',
lintOnSave: true,
// 强制内联CSS
productionSourceMap: false,
css: {
// 启用 CSS modules
requireModuleExtension: false,
// 是否使用css分离插件
extract: false,
// 开启 CSS source maps,一般不建议开启
sourceMap: false
// css预设器配置项
},
devServer: {
host: '0.0.0.0',
hot: true,
disableHostCheck: true,
},
chainWebpack: (config) => {
config.module
.rule('fonts')
.use('url-loader')
.loader('url-loader')
.tap(options => {
// 修改它的选项...
options.limit=100000
options.name='static/fonts/[name].[ext]'
return options
})
config.resolve.alias
.set('@', resolve('src'))
}
};