-
-
Notifications
You must be signed in to change notification settings - Fork 403
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Next 15 + React 19 #1233
base: main
Are you sure you want to change the base?
Next 15 + React 19 #1233
Conversation
This reverts commit e588b04.
Thanks for the migration. i'm was able to Module not found: Can't resolve @acme/ui/button for every single import from Anything i'm missing out?
|
Should've been fixed. I'll look into it |
@jpainam Works fine for me. Make sure you've updated the |
@@ -10,14 +10,14 @@ | |||
"typecheck": "tsc --noEmit" | |||
}, | |||
"dependencies": { | |||
"@auth/core": "0.34.2" | |||
"@auth/core": "0.37.2" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This upgrade messed up the expo auth last time I tried it. Didn't investigate further what it was though
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll take a look
"prettier": "catalog:", | ||
"turbo": "^2.1.3", | ||
"turbo": "~2.1.3", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
??
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Turbo 2.2 crashes my projects in my work repo. I think it also did in this one. Not sure. I'll try again
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yup. Also panics here. In every app dev server (nextjs/expo)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, it happens with me as well. 2.2.3 is a bit better, but it still happens
That was the issue. Had to export each file individually |
Is that a bug or intended behavior ? |
I couldn't find anything mentioning this directly. There is this indirect mention. I think they simply don't support it. |
That's for turborepo though, I'm guessing the limitation you're pointing at is about turbopack? Either way I'm fine with explicit exports just thought if we should file an issue to turbopack since afaik everything that works with webpack should work in turbopack too |
Yes
That's fair. I'm going to open an issue on vercel/next.js. This aside though, it sucks to manually add the export for each ui element every time you install it but having autocomplete is worth it imo. Should we keep it explicit either way? |
I honestly thought we already were using explicit due to the limitation in auto-imports. |
I made the commit that changed that due to us emitting type defs and the exports getting out of control. I'm dropping |
Hmm not sure I like that reasoning 😅 There's scripting that can be done to automate it if that's the main concern But either way declaration emitting is to reduce the work the language server has to do and I'm not sure these React components are very heavy to infer... It's more for Zod, tRPC, Drizzle etc that does a lot of type shenanigans that you can notice the gains of declaration files vs live inference |
Turns out webpack is the problem: I tried recreating the issue without using an array. This was what we were doing: {
"exports": {
"./*": [
"./src/*.ts",
"./src/*.tsx"
]
}
} I just accidentally figured out that it works just fine without the array: {
"exports": {
"./*": "./src/*.tsx"
}
} This is not a turbo issue. We could continue using the wildcard export for convenience and lose autocomplete (note that autocomplete works fine after importing an element manually the first time in a .ts file). What should we do? |
I agree. This PR fixes that. That was my bad 😅 We're keeping explicit exports then |
@jpainam You can keep the wildcard export if it's more convenient for you. Just replace the array with the string as I explained and see if it works. |
The index file is a .ts so we need the array though (unless you change to index.tsx even for non-react stuff 😭) |
|
I should've written the complete version of the {
"exports": {
".": "./src/index.ts",
"./*": "./src/*.tsx"
}
} This should work IF you want to use the wildcard export. The recommendation is exporting each element separately. Also haven't figured out how to export wildcard |
Cool cool 👍👍 To make explicit exports less of a headache and risk of forgetting to add them, we could add a small script wrapping shadcn cli that after installation,
|
Currently expo dev server is failing due to react versions clashing. Going to fix that |
Totally agree |
Encountered a potential pnpm bug while trying to fix expo |
@types/eslint__js is not needed anymore
Shadcn will also update some of its components in general preparation for React 19: Not sure if they have updated it, just dropping the link here 👍 |
I couldn't find anything we can change in the page you mentioned. Seems like something for third-party cli packages. Am I missing something? |
Can remove all the forwardRef stuff but let's do that in a follow up PR |
|
No description provided.