-
Notifications
You must be signed in to change notification settings - Fork 172
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 configure oruga-next
with Nuxt 3
?
#220
Comments
@jtommy 👍 looking forward! |
|
@k0mar12 I am getting the following error by using your code (I am using fresh install of
|
@themodernpk ERROR happens, i belive, coz ur are not using Failed to resolve component: o-button - The problem on the Oruga side |
@k0mar12 Oruga side? Oruga works well on Nuxt 2 and the next version is really similar to it. |
@jtommy & @k0mar12 I am trying to use Plugin code import { defineNuxtPlugin } from '#app';
import Oruga from '@oruga-ui/oruga-next';
export default defineNuxtPlugin((nuxtApp) => {
nuxtApp.vueApp.use(Oruga)
}) Page code <template>
<div>
<ClientOnly>
<o-button variant="primary">Primary</o-button>
</ClientOnly>
</div>
</template> Getting the following results:
|
confused mistakes, sry, not this error problem on oruga side, vue warn will probably on oruga side, which asking next @themodernpk |
I got it. Im sry, the problem could be in nuxt 3 :) @themodernpk U should run Oruga on both side in Nuxt 3. I mean, remove P.S.: Edited my first answear, check it |
This is for those who would like to use Step 1: Create import { defineNuxtPlugin } from '#app';
import Oruga from '@oruga-ui/oruga-next';
export default defineNuxtPlugin((nuxtApp) => {
nuxtApp.vueApp.use(Oruga)
}) Step 2: Remove <template>
<div>
<o-button variant="primary">Primary</o-button>
<o-button variant="success">Success</o-button>
<o-button variant="danger">Danger</o-button>
<o-button variant="warning">Warning</o-button>
<o-button variant="info">Info</o-button>
</div>
</template> Step 3: Import scss in import { defineNuxtConfig } from 'nuxt3'
// https://v3.nuxtjs.org/docs/directory-structure/nuxt.config
export default defineNuxtConfig({
css: [
// SCSS file in the project
'@oruga-ui/oruga-next/src/scss/oruga-full-vars.scss',
],
}) Now, you're good to go. |
How to configure
oruga-next
withNuxt 3
?The text was updated successfully, but these errors were encountered: