feat: Experimental support for --turbo (requires next@^14.0.3) - #641
Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
|
I was literally just looking for this 👀 is this going to be added on |
| messages: ( | ||
| await (locale === 'en' | ||
| ? // When using Turbopack, this will enable HMR for `en` | ||
| import(`../messages/en.json`) |
There was a problem hiding this comment.
Indeed! Is there a way we could iterate through the available languages (all available languages and load them directly here?)
Is that even necessary? Would loading all languages without string interpolation be problematic?
Because by that snippet you're still loading conditionally, but how we could do "magic" and make Turbopack understand that it can load all the languages in that fashion?
There was a problem hiding this comment.
Would loading all languages without string interpolation be problematic?
That should work too, yes! Depending on how many locales your app has (and how often they change), this could surely be a good idea!
There was a problem hiding this comment.
I see that HMR benefit is mostly just local dev and development is always in English, so just for HMR that might not be necessary.
What I wonder if not using strin interpolation here brings any other Turbopack magic benefit
There was a problem hiding this comment.
I see that HMR benefit is mostly just local dev and development is always in English, so just for HMR that might not be necessary.
That's what I thought too, yes!
@ovflowd Absolutely! 😎 |
|
how it works? const config = {
reactStrictMode: true,
experimental: {
typedRoutes: true,
///?
turbo: {},
},it seems that it can not works |
|
need to specifc .env TURBOPACK=true it seems that works |
Fixes #250
Kapture.2023-11-17.at.14.23.46.mp4
Turbo seemingly supports HMR for JSON files (if the path is static)—this comes in quite handy!