File tree Expand file tree Collapse file tree 4 files changed +17
-8
lines changed Expand file tree Collapse file tree 4 files changed +17
-8
lines changed Original file line number Diff line number Diff line change 2424 },
2525 "dependencies" : {
2626 "@nuxt/kit" : " ^3.0.0" ,
27- "vue-final-modal" : " ^ 4.0.0-rc.9 "
27+ "vue-final-modal" : " >= 4.0.0"
2828 },
2929 "devDependencies" : {
3030 "@nuxt/module-builder" : " ^0.2.1" ,
3131 "@nuxt/schema" : " ^3.0.0" ,
3232 "@nuxtjs/eslint-config-typescript" : " ^12.0.0" ,
3333 "nuxt" : " ^3.0.0" ,
3434 "release-it" : " ^15.5.0"
35- },
36- "peerDependencies" : {
37- "vue-final-modal" : " >=4.0.0"
3835 }
3936}
Original file line number Diff line number Diff line change @@ -6,8 +6,20 @@ export default defineNuxtModule({
66 configKey : 'vue-final-modal' ,
77 } ,
88 setup ( options , nuxt ) {
9- const { resolve } = createResolver ( import . meta. url )
10- addPlugin ( resolve ( './runtime/plugin' ) )
9+ const resolver = createResolver ( import . meta. url )
10+
11+ // Transpile runtime
12+ nuxt . options . build . transpile . push ( resolver . resolve ( './runtime' ) )
13+
14+ nuxt . hook ( 'prepare:types' , ( { references } ) => {
15+ references . push ( { types : '@vue-final-modal/nuxt' } )
16+ } )
17+
18+ // Add runtime plugin before the router plugin
19+ // https://github.com/nuxt/framework/issues/9130
20+ nuxt . hook ( 'modules:done' , ( ) => {
21+ addPlugin ( resolver . resolve ( './runtime/plugin' ) )
22+ } )
1123
1224 nuxt . options . css . push ( 'vue-final-modal/style.css' )
1325 } ,
Original file line number Diff line number Diff line change 11import { createVfm } from 'vue-final-modal'
2- import { defineNuxtPlugin } from 'nuxt/ app'
2+ import { defineNuxtPlugin } from '# app'
33
44export default defineNuxtPlugin ( ( nuxtApp ) => {
55 const vfm = createVfm ( )
You can’t perform that action at this time.
0 commit comments