-
Notifications
You must be signed in to change notification settings - Fork 0
/
vue.config.js
35 lines (34 loc) · 993 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
'use strict'
const PORT = process.env.port || 3000
// eslint-disable-next-line @typescript-eslint/no-var-requires
const path = require('path')
const resolve = path.resolve
module.exports = {
publicPath: '/',
outputDir: 'dist',
productionSourceMap: false,
devServer: {
host: 'localhost',
port: PORT,
open: true,
overlay: {
warnings: false,
errors: true
}
},
configureWebpack: {
resolve: {
extensions: ['ts', 'tsx', '.vue', '.js', '.json'],
alias: {
'@': resolve('src'),
'@apis': resolve('src/apis'), // 接口相关
'@assets': resolve('src/assets'), // 静态资源相关
'@auth': resolve('src/common/auth'), // 鉴权相关
'@utils': resolve('src/common/utils'), // 工具包
'@requests': resolve('src/common/requests'), // 请求相关
'@components': resolve('src/components'), // 组件部分
'@views': resolve('src/views') // 业务相关页面
}
}
}
}