shadcn-vue icon indicating copy to clipboard operation
shadcn-vue copied to clipboard

[Feature]: Support Nuxt Layer

Open madsh93 opened this issue 1 year ago • 7 comments

Describe the feature

Hi!

Nuxt Layer is an excellent tool to create an instance of nuxt that contains boilerplate/themes that are to be used on multiple sites. It would make sense for Shadcn to support Nuxt Layer, thus not having to install Shadcn on all layers.

Additional information

  • [ ] I intend to submit a PR for this feature.
  • [ ] I have already implemented and/or tested this feature.

madsh93 avatar Oct 05 '23 07:10 madsh93

Hey hey @madsh93 .. I believe this would be super easy right? Just create a new folder then initialize the shadcn-vue installation.

Maybe we can update the docs for whoever want to use this Layer approach? 😁 Or you have any approach in mind?

zernonia avatar Oct 05 '23 07:10 zernonia

@zernonia Okay, just great if its easy. I just don't know how to. :-) If it could get added to the docs I would very much appreciate that.

madsh93 avatar Oct 05 '23 13:10 madsh93

I've created a NuxtLayer template https://github.com/radix-vue/shadcn-vue-nuxt-layer, for whoever interested. It might have some issue.. so please me let know!!

zernonia avatar Oct 06 '23 07:10 zernonia

Building on the example provided by @zernonia I posted a working example here:

https://github.com/gmickel/shadcn-vue-nuxt-layer-monorepo

The key change I made was to add

tailwindcss: {
    cssPath: join(currentDir, './assets/css/tailwind.css'),
  }

to the nuxt.config of the base layer. Hope this helps!

gmickel avatar Oct 12 '23 14:10 gmickel

Thanks @gmickel ! I've updated the example with your suggestion!

zernonia avatar Oct 21 '23 03:10 zernonia

@zernonia

Your repo is working. But after I installed all components. It's show errors.

Screenshot 2024-03-22 at 5 50 42 PM

dangvanthanh avatar Mar 22 '24 11:03 dangvanthanh

@madsh93

Try Shadcn Layer UI. Hope this helpers!

Thanks @gmickel @zernonia for example.

dangvanthanh avatar Mar 29 '24 05:03 dangvanthanh