Not using Vite or ts but https://stackoverflow.com/a/76989526/29355805 above got me on the right track! (i cant comment or upvote yet on here)
I moved some stuff around manually and somehow it FINALLY started working. Thought i'd share incase if anyone else is on an even more similar boat.
jsconfig.json--
{
"compilerOptions": {
"paths": {
"@/*": ["./src/*"]
}
},
"include": ["**/*.js", "**/*.jsx", "tailwind.config.js"],
"exclude": ["node_modules"]
}
then add a component-- npx shadcn add
then created a lib
directory in ./src/components,
and manually dropped the utils.js file in.
then added alias: { "@": path.resolve(__dirname, "../../src/components"), }
inside webpack.config.js
const path = require("path");
const options = {
resolve: {
extensions: [".css", ".scss", ".ts", ".tsx"],
alias: {
"@": path.resolve(__dirname, "../../src/components"),
},
},
i restarted servers, loaded a button in, and it worked! 🎉 good luck to the next person!🤞