File tree 1 file changed +26
-0
lines changed
1 file changed +26
-0
lines changed Original file line number Diff line number Diff line change
1
+ export default function ( ) {
2
+ const nuxt = this . nuxt
3
+ nuxt . options . vue . compilerOptions . directiveTransforms = nuxt . options . vue . compilerOptions . directiveTransforms || { }
4
+ nuxt . options . vue . compilerOptions . directiveTransforms . tooltip = ( ) => ( {
5
+ props : [ ] ,
6
+ needRuntime : true ,
7
+ } )
8
+
9
+ nuxt . options . css . push ( 'floating-vue/dist/style.css' )
10
+
11
+ this . addPlugin ( {
12
+ filename : 'floating-vue.mjs' ,
13
+ getContents : ( ) => `
14
+ import { defineNuxtPlugin } from '#app'
15
+ import FloatingVue from 'floating-vue'
16
+
17
+ export default defineNuxtPlugin((nuxtApp) => {
18
+ // @TODO cutomization
19
+ nuxtApp.vueApp.use(FloatingVue)
20
+ })
21
+ ` ,
22
+ } )
23
+
24
+ // @TODO remove when floating-ui supports native ESM
25
+ nuxt . options . build . transpile . push ( 'floating-vue' , '@floating-ui/core' , '@floating-ui/dom' )
26
+ }
You can’t perform that action at this time.
0 commit comments