ui
ui copied to clipboard
Next JS 13.4 + Shadcn/ui - Template Project with src directory
I wanted to use src
directory in my next project but after running the command npx shadcn-ui init
the app was broken. Shadcn ui works absolutely fine without using src
directory but, I think there are some people like me who are more comfortable with src
directory. So, i made a template for it - shadcn/ui nextjs src directory initial template.
I request shadcn ui to extend their support for using src
directory, until that this template should to provided to needy users.
A simple and easy fix would be adding these paths to your compilerOptions
in your jsconfig and tsconfig
"paths": { "@/*": ["./*"], "@/components/*": ["./src/components/*"], "@/lib/*": ["./src/lib/*"] },
You can write the second path according to your folder structure.