Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to use it with nuxt3? #117

Open
kirtan403 opened this issue Apr 26, 2023 · 2 comments
Open

How to use it with nuxt3? #117

kirtan403 opened this issue Apr 26, 2023 · 2 comments

Comments

@kirtan403
Copy link

Getting an error :

[Vue warn]: Failed to resolve component: XyzTransition

My Setup:

"nuxt": "^3.3.1",

File: anim-xyz.client.js

import VueAnimXyz from '@animxyz/vue3'
import '@animxyz/core' // Import css here if you haven't elsewhere

export default defineNuxtPlugin((nuxtApp) => {
  nuxtApp.vueApp.use(VueAnimXyz)
})

Tried adding build transpile in nuxt.config.ts but not working.

build: {
    transpile: ["@animxyz/core", "@animxyz/vue3", "clsx"],
}

Also tried adding animxyz css in nuxt.config.ts but doesn't work:

css: [
    "~/assets/css/main.css",
    "@animxyz/core",
    "@animxyz/core/dist/animxyz.min.css",
  ],

Nothing works. Any ides?

@sarwan920
Copy link

Hey, I am trying to add AnimXYZ in my nuxt3 application too, did you make it work or? I registerd as plugin but it isn't working,

@LynxTR
Copy link

LynxTR commented Mar 3, 2024

You guys can add it as plugin, for example:

plugins/animxyz.client.ts

import VueAnimXyz from '@animxyz/vue3'
import '@animxyz/core'

export default defineNuxtPlugin(({ vueApp }) => {
  vueApp.use(VueAnimXyz)
})

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants