ui
ui copied to clipboard
[CLI] : add src directory in tailwind.config
after using shadcn-ui init it should also add './src/**/*.{ts,tsx}' path in tailwind.config.js for src directory
content: [
"./pages/**/*.{ts,tsx}",
"./components/**/*.{ts,tsx}",
"./app/**/*.{ts,tsx}",
"./src/**/*.{ts,tsx}",
],
I've created a pull request
I've encountered the same problem as my next project was originally initialized with a src dir. Not sure if specifically limiting the scope of tailwind parser to pages/app/components folder has any advantage or your fix ./src/**/* would work just fine, since all three are contained within src.
Maybe you can choose not include all these folders in the src folder all together when initializing a Next project from scratch with shadcn
That's a good point. However the original next.js app CLI provides an option to include src during initialization. And simply re-initialize a project to add shadcn UI library as a dependency might not be an option for some people.
Granted this is an easy fix, but it is confusing when the shad CLI doesn't support next options.
I believe this is fixed in the latest cli. Marking this as done. Feel free to reopen if not.