mirror of
https://framagit.org/les/gancio.git
synced 2025-01-31 16:42:22 +01:00
do not use @nuxtjs/vuetify module, manually preload vuetify via plugin
This commit is contained in:
parent
5ec01cc3f2
commit
df4bc563a6
3 changed files with 44 additions and 28 deletions
|
@ -24,8 +24,9 @@ module.exports = {
|
|||
** Global CSS
|
||||
*/
|
||||
css: [
|
||||
'@/assets/style.less',
|
||||
'@mdi/font/css/materialdesignicons.css'
|
||||
'vuetify/dist/vuetify.min.css',
|
||||
'@mdi/font/css/materialdesignicons.css',
|
||||
'@/assets/style.less'
|
||||
],
|
||||
|
||||
/*
|
||||
|
@ -34,21 +35,13 @@ module.exports = {
|
|||
plugins: [
|
||||
'@/plugins/i18n.js',
|
||||
'@/plugins/filters', // text filters, datetime filters, generic transformation helpers etc.
|
||||
'@/plugins/vue-clipboard', // vuetify
|
||||
'@/plugins/vuetify', // vuetify
|
||||
'@/plugins/axios', // axios baseurl configuration
|
||||
'@/plugins/validators', // inject validators
|
||||
'@/plugins/api', // api helpers
|
||||
{ src: '@/plugins/v-calendar', ssr: false } // v-calendar
|
||||
],
|
||||
|
||||
render: {
|
||||
compressor: false,
|
||||
bundleRenderer: {
|
||||
shouldPreload: (file, type) => {
|
||||
return ['script', 'style', 'font'].includes(type)
|
||||
}
|
||||
}
|
||||
},
|
||||
/*
|
||||
** Nuxt.js modules
|
||||
*/
|
||||
|
@ -94,16 +87,9 @@ module.exports = {
|
|||
}
|
||||
}
|
||||
},
|
||||
buildModules: [
|
||||
'nuxt-build-optimisations',
|
||||
'@nuxtjs/vuetify',
|
||||
// ['nuxt-express-module', { expressPath: 'server/', routesPath: 'server/routes' }],
|
||||
],
|
||||
vuetify: {
|
||||
defaultAssets: false,
|
||||
optionsPath: './vuetify.options.js',
|
||||
treeShake: true
|
||||
/* module options */
|
||||
build: {
|
||||
corejs: 3,
|
||||
cache: true,
|
||||
hardSource: true
|
||||
},
|
||||
|
||||
}
|
||||
|
|
|
@ -1,6 +0,0 @@
|
|||
import Vue from 'vue'
|
||||
import VueClipboard from 'vue-clipboard2'
|
||||
|
||||
export default () => {
|
||||
Vue.use(VueClipboard)
|
||||
}
|
36
plugins/vuetify.js
Normal file
36
plugins/vuetify.js
Normal file
|
@ -0,0 +1,36 @@
|
|||
import Vue from 'vue'
|
||||
import VueClipboard from 'vue-clipboard2'
|
||||
import Vuetify from 'vuetify'
|
||||
|
||||
// import it from 'vuetify/lib/locale/it.js'
|
||||
// import en from 'vuetify/lib/locale/en.js'
|
||||
// import es from 'vuetify/lib/locale/es'
|
||||
// import no from 'vuetify/lib/locale/no'
|
||||
// import fr from 'vuetify/lib/locale/fr'
|
||||
// import ca from 'vuetify/lib/locale/ca'
|
||||
|
||||
|
||||
export default ({ app }) => {
|
||||
Vue.use(Vuetify)
|
||||
Vue.use(VueClipboard)
|
||||
app.vuetify = new Vuetify({
|
||||
// lang: {
|
||||
// locales: { en, it }, //, es, fr, no, ca },
|
||||
// current: 'en'
|
||||
// },
|
||||
icons: {
|
||||
iconfont: 'mdi'
|
||||
},
|
||||
theme: {
|
||||
dark: true,
|
||||
themes: {
|
||||
dark: {
|
||||
primary: '#FF6E40'
|
||||
},
|
||||
light: {
|
||||
primary: '#FF4500'
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
Loading…
Reference in a new issue