Open fluid-design-io opened 9 months ago
Hi @fluid-design-io , that's awesome thank you. 💪
Btw I removed the index
file since I've managed to make auto-imports work without it.
I'll leave this issue opened in case someone needs it.
@dan5py I was not able to make auto imports work on VsCode. That should work out of the box?
@dan5py I was not able to make auto imports work on VsCode. That should work out of the box?
Hi @atralice, it should work out of the box. Maybe it's the typescript
version, I've tested it with 5.4.3
and it works.
You can try adding typescript@5.4.3
to the workspace root.
If you're using pnpm you can do it with:
pnpm add -wD typescript@5.4.3
And then select the typescript version of your workspace from the VSCode's command palette.
First of all, great repo!
I have used your monorepo setup from quite a long time ago and I loved how you use a script to generate index.ts on the root of the ui component folder. For me, it makes every easier and made the code imports cleaner, which I can do something like this:
Recently I'm stared creating a new monorepo and I saw things have changed a bit. (And I loved the improvements ✨)
However, I missed having the
index.ts
for all component import shortcut. I'm not sure if it is because the old scripts were having confilcts with theuse-toast.ts
and now thesonnar.tsx
component, so I've modified thegenerateIndex.mts
like so which solves issues mentioned above.The only thing that will be different for the import paths from shadcn doc is the
Sonner
component, which now becomes:It's isn't an issue really, just wanted to share this in case anyone needs it!