- Run
bun ./index.ts
- Go to http://localhost:3000
- Submit the form
You see You pasted: a bunch of stuff here...
You see You pasted: ""
If you replace the await import
with an old fashioned require
the issue goes away.
Also, strangely, if you add an await before you do the await import
, the issue goes away, for example:
// In index.ts, add this setTimeout line before the async import.
await new Promise((r) => setTimeout(r, 1));
const { Page } = await import('./hi');