35 lines
942 B
JavaScript
35 lines
942 B
JavaScript
module.exports = (api) => {
|
|
const hasVuetifyLoader = Boolean(
|
|
api.service.pkg.devDependencies['vuetify-loader'] ||
|
|
api.service.pkg.dependencies['vuetify-loader']
|
|
)
|
|
|
|
if (hasVuetifyLoader) {
|
|
const VuetifyLoaderPlugin = require('vuetify-loader/lib/plugin')
|
|
|
|
api.chainWebpack(config => {
|
|
config.plugin('VuetifyLoaderPlugin')
|
|
.use(VuetifyLoaderPlugin)
|
|
})
|
|
}
|
|
|
|
// Resolve asset references from components
|
|
api.chainWebpack(config => {
|
|
config.module
|
|
.rule('vue')
|
|
.use('vue-loader')
|
|
.tap(options => ({
|
|
...options,
|
|
transformAssetUrls: {
|
|
// v-app-bar extends v-toolbar
|
|
'v-app-bar': 'src',
|
|
// v-carousel-item extends v-img
|
|
'v-carousel-item': ['src', 'lazy-src'],
|
|
'v-img': ['src', 'lazy-src'],
|
|
'v-navigation-drawer': 'src',
|
|
'v-parallax': 'src',
|
|
'v-toolbar': 'src',
|
|
},
|
|
}))
|
|
})
|
|
}
|