File tree Expand file tree Collapse file tree 5 files changed +21
-7
lines changed Expand file tree Collapse file tree 5 files changed +21
-7
lines changed Original file line number Diff line number Diff line change 1+ export default defineNuxtRouteMiddleware ( ( to ) => {
2+ // eslint-disable-next-line no-console
3+ console . log ( 'global middleware' , to . path , useNuxtApp ( ) . $vuetify )
4+ } )
Original file line number Diff line number Diff line change 1+ export default defineNuxtRouteMiddleware ( ( to ) => {
2+ // eslint-disable-next-line no-console
3+ console . log ( 'middleware' , to . path , useNuxtApp ( ) . $vuetify )
4+ } )
Original file line number Diff line number Diff line change 33import { ssrClientHintsConfiguration } from ' virtual:vuetify-ssr-client-hints-configuration'
44import prependAvatar from ' ~/assets/logo.svg'
55
6+ definePageMeta ({
7+ middleware: ' vuetify' ,
8+ })
9+
610const value = reactive <{
711 name1? : string
812 name2? : string
Original file line number Diff line number Diff line change 11import type { createVuetify } from 'vuetify'
22import { configureVuetify } from './config'
3- import { defineNuxtPlugin , useNuxtApp } from '#imports'
3+ import { defineNuxtPlugin } from '#imports'
44import type { Plugin } from '#app'
55
66const plugin : Plugin < {
77 vuetify : ReturnType < typeof createVuetify >
88} > = defineNuxtPlugin ( {
99 name : 'vuetify:configuration:plugin' ,
1010 enforce : 'post' ,
11- // i18n runtime plugin is async
11+ // @ts -expect-error i18n plugin missing on build time
12+ dependsOn : [ 'i18n:plugin' ] ,
13+ // i18n runtime plugin can be async
1214 parallel : false ,
13- setup ( ) {
14- useNuxtApp ( ) . hook ( 'app:created' , configureVuetify )
15+ async setup ( ) {
16+ await configureVuetify ( )
1517 } ,
1618} )
1719
Original file line number Diff line number Diff line change 11import type { createVuetify } from 'vuetify'
22import { configureVuetify } from './config'
3- import { defineNuxtPlugin , useNuxtApp } from '#imports'
3+ import { defineNuxtPlugin } from '#imports'
44import type { Plugin } from '#app'
55
66const plugin : Plugin < {
77 vuetify : ReturnType < typeof createVuetify >
88} > = defineNuxtPlugin ( {
99 name : 'vuetify:configuration:plugin' ,
1010 enforce : 'post' ,
11- setup ( ) {
12- useNuxtApp ( ) . hook ( 'app:created' , configureVuetify )
11+ async setup ( ) {
12+ await configureVuetify ( )
1313 } ,
1414} )
1515
You can’t perform that action at this time.
0 commit comments