You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is there a best way of importing this in a Nuxt project?
First thing I did is to create a vue-global-api.ts file inside my plugins directory and import it in plugins in nuxt.config.ts. The types are working but when you run it, you'll still get undefined errors.
Second thing I did, which worked, is to just import vue-global-api in each of the layout component inside layouts folder.
Just wondering if there's a better way of doing this. Thanks!
The text was updated successfully, but these errors were encountered:
buildModules: ['@nuxt/typescript-build','@nuxtjs/composition-api/module','nuxt-typed-vuex',['unplugin-auto-import/nuxt',{// global imports to register// imports: ['vue2']imports: [{'@nuxtjs/composition-api': CommonCompositionAPI,},],},],],
Preset vue2 and custom preset still gives cannot find name 'defineComponent' etc..
Hi, feel free to close this anytime.
Is there a best way of importing this in a Nuxt project?
First thing I did is to create a
vue-global-api.ts
file inside myplugins
directory and import it inplugins
innuxt.config.ts
. The types are working but when you run it, you'll still get undefined errors.Second thing I did, which worked, is to just import
vue-global-api
in each of the layout component insidelayouts
folder.Just wondering if there's a better way of doing this. Thanks!
The text was updated successfully, but these errors were encountered: