-
Notifications
You must be signed in to change notification settings - Fork 22
/
vue.config.js
53 lines (51 loc) · 1.14 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
const path = require('path');
const StyleLintPlugin = require('stylelint-webpack-plugin');
module.exports = {
publicPath: process.env.NODE_ENV === 'production' ? process.env.VUE_APP_PRODUCTION_PATH : '/',
outputDir: 'dist',
devServer: {
overlay: false,
},
css: {
extract: false,
},
chainWebpack: (config) => {
config.module
.rule('raw')
.include
.add('/docs/views/*/example')
.add('/docs/views/*/api')
.end()
.test(/\.(vue|md)$/)
.use('raw-loader')
.loader('raw-loader')
.end();
config.module
.rule('fonts')
.test(/\.(woff2?|eot|ttf|otf)(\?.*)?$/i)
.use('url-loader')
.loader('url-loader')
.options()
.end();
},
configureWebpack: {
resolve: {
alias: {
'@': path.join(__dirname, 'src/'),
docs: path.join(__dirname, 'docs/'),
},
},
plugins: [
new StyleLintPlugin({
files: [
'src/**/*.{vue,scss}',
'docs/**/*.{vue,scss}',
],
emitError: true,
emitWarning: true,
failOnError: false,
failOnWarning: false,
}),
],
},
};