-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.js
30 lines (28 loc) · 1.09 KB
/
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
const createVueTemplateCompilerWrapper = require('./create-vue-template-compiler-wrapper')
//const collectTagsCompilerModule = require('./collect-tags-compiler-module')
module.exports = (api, projectOptions) => {
api.chainWebpack(webpackConfig => {
webpackConfig.module
.rule('vue')
.use('vue-loader')
.loader('vue-loader')
.tap(options => {
options.compiler = createVueTemplateCompilerWrapper(options.compiler)
/*
if (options.compilerOptions == null) options.compilerOptions = {}
if (options.compilerOptions.modules == null) options.compilerOptions.modules = []
options.compilerOptions.modules.push(collectTagsCompilerModule)
*/
return options
})
webpackConfig.module
.rule('vue-custom-block-auto-import-tags')
.resourceQuery(/blockType=auto-import-tags/)
.use('babel-loader')
.loader('babel-loader')
.end()
.use('auto-import-tags')
.loader(require.resolve('./auto-import-tags-loader'))
.end()
})
}