forked from uncleLian/vue2-echo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
vue.config.js
35 lines (35 loc) · 887 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
const path = require('path')
function resolve(dir) {
return path.join(__dirname, dir)
}
const projectName = require('./package.json').name
module.exports = {
// 如果部署项目时不是根目录,请参照官网修改publicPath值
// https://cli.vuejs.org/zh/config/#publicpath
publicPath: '/',
outputDir: 'dist',
lintOnSave: true,
productionSourceMap: false,
css: {
sourceMap: false,
modules: false,
loaderOptions: {
stylus: {
// 全局引入index.styl文件
import: [path.resolve(__dirname, './src/assets/css') + '/index.styl']
}
}
},
devServer: {
port: 8001,
open: true
},
configureWebpack: {
name: projectName,
resolve: {
alias: {
'@': resolve('src')
}
}
}
}