-
Notifications
You must be signed in to change notification settings - Fork 19
/
vue.config.js
44 lines (42 loc) · 1.1 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
const path = require('path')
const Icons = require('unplugin-icons/webpack')
const Components = require('unplugin-vue-components/webpack')
function resolve(dir) {
return path.join(__dirname, dir)
}
module.exports = {
lintOnSave: false,
productionSourceMap: false,
// assetsDir: 'static',
chainWebpack: config => {
config.resolve.alias.set('@', resolve('src')).set('lin', resolve('src/lin')).set('assets', resolve('src/assets'))
config.module.rule('ignore').test(/\.md$/).use('ignore-loader').loader('ignore-loader').end()
},
configureWebpack: {
plugins: [
Components({ /** options **/ }),
// 使用
Icons({
compiler: 'vue3',// 自动安装
autoInstall: true
}),
],
devtool: 'source-map',
resolve: {
extensions: ['.js', '.json', '.vue', '.scss', '.html'],
},
},
css: {
loaderOptions: {
sass: {
prependData: `@import "@/assets/style/shared.scss";`,
},
},
},
devServer: {
compress: true,
port: 8080
},
// node_modules依赖项es6语法未转换问题
transpileDependencies: ['vuex-persist'],
}