This repository has been archived by the owner on Aug 2, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 32
/
vue.config.js
77 lines (68 loc) · 1.71 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
76
77
// @ts-check
/* eslint-env node */
// This require-statement has to be high up – otherwise you will get strange errors.
const Path = require('path')
const BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin
const baseUrl = process.env.BASE_URL
const publicPath = baseUrl
// eslint-disable-next-line no-console
console.log('🌈 ', { baseUrl, publicPath })
module.exports = {
publicPath,
/**
* @param {import("webpack-chain")} config
*/
chainWebpack: config => {
config.module
.rule('vue')
.use('fd-src-loader')
.loader(require.resolve('./loaders/fd-src-loader'))
.after('vue-loader')
// config
// .plugin('webpack-analyzer')
// .use(BundleAnalyzerPlugin, [
// {
// analyzerPort: 10001,
// openAnalyzer: false
// }
// ])
// .end()
config.module
.rule('vue')
.use('fd-component-api-loader')
.loader('fd-component-api-loader')
.after('vue-loader')
.end()
config.module
.rule('vue')
.use('vue-loader')
.loader('vue-loader')
.tap(() => {
return {
// compilerOptions: {
// whitespace: "condense"
// }
}
})
config.module
.rule('md')
.test(/\.md/)
.use('vue-loader')
.loader('vue-loader')
.options({
// compilerOptions: {
// whitespace: "condense"
// }
})
.end()
.use('fd-markdown-loader')
.loader('fd-markdown-loader')
.end()
config.resolveLoader.modules
.add('node_modules')
.add(Path.resolve(__dirname, 'loaders'))
.end()
},
lintOnSave: false
}
module.exports.parallel = false