-
Notifications
You must be signed in to change notification settings - Fork 429
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
fix: support react compiler for auto updating studios #7897
base: next
Are you sure you want to change the base?
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
No changes to documentation |
Component Testing Report Updated Nov 28, 2024 12:56 AM (UTC) ✅ All Tests Passed -- expand for details
|
⚡️ Editor Performance ReportUpdated Thu, 28 Nov 2024 00:58:50 GMT
Detailed information🏠 Reference resultThe performance result of
🧪 Experiment resultThe performance result of this branch
📚 Glossary
|
Description
When using both
autoUpdates: true
andreactCompiler: {target: '18' | '19'}
then only userland custom studio code is compiled, while thesanity
and@sanity/vision
modules are not.I thought we were pulling these packages off of npm, I wasn't aware they had their own vite pipeline 😅
It turns out that if
autoUpdates: true
is in use, then thesanity
and@sanity/vision
code isn't pre-compiled by React Compiler.What to review
I'm not super familiar with how this pipeline is setup, so I hope it's the right place 😮💨
Testing
I don't know how we can test this e2e without publishing. I've verified that other libraries that are pushed out, like
@sanity/ui
, as well as custom studio code, works just fine withautoUpdates: true
, as seen in the community studio for example. I see no reason it should fail forsanity
and@sanity/vision
.Notes for release
When using
autoUpdates: true
thesanity
and@sanity/vision
were no longer using pre-compiled code auto-memoized by the React Compiler. Leading to slower perf. It doesn't make sense to be forced to choose between fastest possible studio vs lowest effort maintenance. You can, and should, have your cake and eat it too 🍰