-
Notifications
You must be signed in to change notification settings - Fork 42
/
vue.config.js
47 lines (42 loc) · 1.19 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
const path = require('path')
const { IgnorePlugin } = require('webpack')
module.exports = {
chainWebpack: config => {
config
.entry('app')
.clear()
.add('./demo/main.js')
// Modify the export of every .vue file so that the
// component is automatically installed if a global
// Vue is available (e.g. from dropping Vue in as a
// script tag).
config.module
.rule('vue')
.use('global-vue-loader')
.loader(path.resolve(__dirname, 'build-utils/global-vue-loader'))
.before('vue-loader')
config.module
.rule('meta')
.resourceQuery(/blockType=meta/)
.use('null-loader')
.loader('null-loader')
config.module
.rule('example')
.resourceQuery(/blockType=example/)
.use('null-loader')
.loader('null-loader')
if (!process.env.VUE_APP_E2E) {
config
.plugin('ignore-e2e-packages')
.use(IgnorePlugin, [{ resourceRegExp: /^hello-vue-components/ }])
}
},
devServer: {
contentBase: path.join(__dirname, 'tests/e2e/fixtures/public')
},
css: {
// Optionally set this to true if you want CSS
// to be extracted into separate CSS files.
extract: false
}
}