W
Wasp•15mo ago
Fernando

Unsure about how to add shadcn/ui to Wasp

I added a vite.config.ts to my src/client with this content:
import path from "path";
import { defineConfig } from "vite";

export default defineConfig({
resolve: {
alias: {
"@": path.resolve(__dirname, "./src"),
},
},
});
import path from "path";
import { defineConfig } from "vite";

export default defineConfig({
resolve: {
alias: {
"@": path.resolve(__dirname, "./src"),
},
},
});
But, since I don't have a package.json, I can't run npx shadcn-ui@latest init. What should I do? Edit: if for some reason it's difficult to do so, I would also be interested in Preline.
9 Replies
miho
miho•15mo ago
I'm not sure if we can make it work with Wasp TBH, I'll have to try to set it up and see what happens 🙂
miho
miho•9mo ago
Gist
Using ShadCN with Wasp 0.12+
Using ShadCN with Wasp 0.12+. GitHub Gist: instantly share code, notes, and snippets.
martinsos
martinsos•9mo ago
Wasp now has package.json so it is easier to use shadcnui!
Stefan Vitória
Stefan Vitória•7mo ago
Any recent guides after this change?
martinsos
martinsos•7mo ago
I know people used it without much trouble. I think you should be able to go for it without any special guide.
Stefan Vitória
Stefan Vitória•7mo ago
Yeah. Thanks. I have done it
MEE6
MEE6•7mo ago
Wohooo @Stefan Vitória, you just became a Waspeteer level 2!
martinsos
martinsos•7mo ago
Awesome! Was I correct, nothign special, or did you have to do something special?
Stefan Vitória
Stefan Vitória•7mo ago
Nothing special at all. Few imports adjusts and thats it
Want results from more Discord servers?
Add your server