unovue / shadcn-vue

Vue port of shadcn-ui
https://www.shadcn-vue.com/
MIT License
5.32k stars 318 forks source link

[Feature]: Support Nuxt Layer #100

Open madsh93 opened 1 year ago

madsh93 commented 1 year ago

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

zernonia commented 1 year ago

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?

madsh93 commented 1 year ago

@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.

zernonia commented 1 year ago

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!!

gmickel commented 1 year ago

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!

zernonia commented 1 year ago

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

dangvanthanh commented 8 months ago

@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 commented 8 months ago

@madsh93

Try Shadcn Layer UI. Hope this helpers!

Thanks @gmickel @zernonia for example.