-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathindex.js
39 lines (37 loc) · 883 Bytes
/
index.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
const transformAssetUrls = {
video: ['src', 'poster'],
source: 'src',
img: 'src',
image: 'xlink:href'
}
module.exports = api => {
api.chainWebpack(webpackConfig => {
// prettier-ignore
webpackConfig.module
.rule('template')
.test(/\.html$/)
.exclude
.add(/public\/index.html$/)
.end()
.use('template')
.loader('vue-template-loader')
.options({
scoped: true,
transformAssetUrls
})
// prettier-ignore
webpackConfig.module
.rule('functional')
.test(/\.functional\.html$/)
.exclude
.add(/public\/index.html$/)
.end()
.use('functional')
.loader('vue-template-loader')
.options({
scoped: true,
functional: true,
transformAssetUrls
})
})
}