forked from RainManGO/vue3-composition-admin
-
Notifications
You must be signed in to change notification settings - Fork 0
/
vue.config.js
75 lines (75 loc) · 1.63 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
/*
* @Description:配置文件
* @Author: ZY
* @Date: 2020-12-07 11:41:22
* @LastEditors: ZY
* @LastEditTime: 2021-01-27 15:17:29
*/
const { resolve } = require('path')
const path = require('path')
const WebpackBar = require('webpackbar');
const dayjs = require('dayjs')
const time = dayjs().format('YYYY-M-D HH:mm:ss')
process.env.VUE_APP_UPDATE_TIME = time
const {
publicPath,
assetsDir,
outputDir,
lintOnSave,
transpileDependencies,
title,
devPort,
} = require('./src/config/default/vue.custom.config')
module.exports = {
publicPath,
assetsDir,
outputDir,
lintOnSave,
transpileDependencies,
devServer: {
hot: true,
port: devPort,
open: true,
noInfo: false,
overlay: {
warnings: true,
errors: true,
},
},
pluginOptions: {
'style-resources-loader': {
preProcessor: 'scss',
patterns: [
path.resolve(__dirname, 'src/styles/_variables.scss'),
path.resolve(__dirname, 'src/styles/_mixins.scss'),
]
}
},
configureWebpack(){
return {
resolve:{
alias:{
'@':resolve('src'),
'*':resolve(''),
'Assets':resolve('src/assets')
}
},
module:{
rules: [
{
test: /\.(json5?|ya?ml)$/, // target json, json5, yaml and yml files
loader: '@intlify/vue-i18n-loader',
include: [ // Use `Rule.include` to specify the files of locale messages to be pre-compiled
path.resolve(__dirname, 'src/lang')
]
},
],
},
plugins:[
new WebpackBar({
name:title,
})
]
}
},
}