Open pawelblaszczyk5 opened 2 weeks ago
Seems the minimal reproduction is this:
// app/page.tsx
import { x } from "./test";
/** Add your relevant code here for the issue to reproduce */
export default function Home() {
return <h1>Hello world abc {x}</h1>;
}
// app/test.ts
export const x = 5;
const a = 10;
if (a !== 10) {
await new Promise((resolve) => setTimeout(resolve, 100));
}
Anytime the condition is false
it will get stuck, if the condition is true
is does not get stuck. I.e. if (a === 10) {
does not get stuck.
Link to the code that reproduces this issue
https://github.com/pawelblaszczyk5/async-module-turbo-repro
To Reproduce
localhost:3000
in the browserpage.tsx
and add it back after sucessful compilation)Video with reproduction:
https://www.youtube.com/watch?v=PJ9jI-0uDmg
As you can see it sometimes work after restarting the dev server or removing and adding back the import. In console I'm not getting
GET / 200 in xxms
sometimes and my browser is stuck loading, top bar spinning.Current vs. Expected behavior
It should work fine, the same way as it does without
--turbo
.Provide environment information
Which area(s) are affected? (Select all that apply)
Turbopack
Which stage(s) are affected? (Select all that apply)
next dev (local)
Additional context
No response
PACK-3039