File tree Expand file tree Collapse file tree 2 files changed +6
-13
lines changed Expand file tree Collapse file tree 2 files changed +6
-13
lines changed Original file line number Diff line number Diff line change 1
- import { resolve } from 'path'
2
- import { fileURLToPath } from 'url'
3
- import { addPlugin , defineNuxtModule } from '@nuxt/kit'
1
+ import { addPlugin , createResolver , defineNuxtModule } from '@nuxt/kit'
4
2
5
- export interface ModuleOptions {
6
- addPlugin : boolean
7
- }
8
-
9
- export default defineNuxtModule < ModuleOptions > ( {
3
+ export default defineNuxtModule ( {
10
4
meta : {
11
5
name : '@vue-final-modal/nuxt' ,
12
6
configKey : 'vue-final-modal' ,
13
7
} ,
14
8
setup ( options , nuxt ) {
15
- const runtimeDir = fileURLToPath ( new URL ( './runtime' , import . meta. url ) )
16
- nuxt . options . build . transpile . push ( runtimeDir )
17
- addPlugin ( resolve ( runtimeDir , 'plugin' ) )
9
+ const { resolve } = createResolver ( import . meta. url )
10
+ addPlugin ( resolve ( './runtime/plugin' ) )
18
11
19
12
nuxt . options . css . push ( 'vue-final-modal/style.css' )
20
13
} ,
Original file line number Diff line number Diff line change 1
1
import { createVfm } from 'vue-final-modal'
2
- import { defineNuxtPlugin } from '# app'
2
+ import { defineNuxtPlugin } from 'nuxt/ app'
3
3
4
4
export default defineNuxtPlugin ( ( nuxtApp ) => {
5
- const vfm = createVfm ( ) as any
5
+ const vfm = createVfm ( )
6
6
7
7
nuxtApp . vueApp . use ( vfm )
8
8
} )
You can’t perform that action at this time.
0 commit comments