-
Notifications
You must be signed in to change notification settings - Fork 9
/
vue.config.js
39 lines (37 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
const path = require('path');
module.exports = {
outputDir: "./web", // or whatever you would like your output directory to be, which will be used in the next step.
chainWebpack: config => {
config.resolve.alias.set(
'vue$',
// If using the runtime only build
path.resolve(__dirname, 'node_modules/vue/dist/vue.runtime.esm.js')
// Or if using full build of Vue (runtime + compiler)
// path.resolve(__dirname, 'node_modules/vue/dist/vue.esm.js')
)
config.module
.rule('vue')
.use('vue-loader')
.loader('vue-loader')
.tap(options => {
options.transformAssetUrls = {
img: 'src',
image: 'xlink:href',
'b-avatar': 'src',
'b-img': 'src',
'b-img-lazy': ['src', 'blank-src'],
'b-card': 'img-src',
'b-card-img': 'src',
'b-card-img-lazy': ['src', 'blank-src'],
'b-carousel-slide': 'img-src',
'b-embed': 'src'
}
return options
})
config.plugin("html").tap(args => {
args[0].title = process.env.VUE_APP_FRIENDLY_NAME
return args
})
},
lintOnSave: false
}