chrisdavies / bun-example-bug

A repo for reproducing bugs I find while playing with Bun

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Bun bug demo

Expected

You see You pasted: a bunch of stuff here...

Actual

You see You pasted: ""

Misc

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');

About

A repo for reproducing bugs I find while playing with Bun


Languages

Language:TypeScript 100.0%