ui icon indicating copy to clipboard operation
ui copied to clipboard

Next JS 13.4 + Shadcn/ui - Template Project with src directory

Open aditya-shrivastavv opened this issue 1 year ago • 1 comments

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.

aditya-shrivastavv avatar Jun 02 '23 10:06 aditya-shrivastavv

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.

nahasco avatar Jun 03 '23 09:06 nahasco