how to connect/use Vuetify 3 in Quasar 2
Connecting Vuetify
npm install vuetify
- create
src/ui/index.js
import { createVuetify } from 'vuetify'
import 'vuetify/styles'
export const vuetifyInstance = createVuetify({/* ... */})
- create
src/boot/registerVuetify.js
import { vuetifyInstance as vuetify } from 'src/ui'
export default ({ app }) => {
app.use(vuetify)
}
add to quasar.config.js
module.exports = configure(function (/*ctx*/) {
return {
//...
boot: [
//...
'~src/boot/registerVuetify'
],
//...
}
})
- exclude quasar UI framework (vite) =>
add to
quasar.config.js
module.exports = configure(function( /*ctx*/ ) {
return {
//...
build: {
//...
extendViteConf(viteConf) {
viteConf.build.rollupOptions = {
output: {
// exclude quasar css framework (this does not completely exclude the framework from the final build)
manualChunks(path) {
if (/node_modules.*quasar/.test(path)) {
return null
}
},
},
},
},
//...
alias: {
'quasar/dist/quasar.css': path.join(__dirname, './src/assets/sass/_your_styles.sass'),
},
},
//...
framework: {
//...
cssAddon: false,
//...
},
}
})