Bun v0.0.34
Features
Slightly better tsconfig.json handling:
jsxImportSourcesupport – if you setjsxImportSourceto"@emotion/react", JSX will auto-import from"@emotion/react/jsx-dev-runtime"instead of"react/jsx-dev-runtime"jsxFragmentFactorysupport – this lets you override what<>transforms into. By default it's"Fragment", since<>becomesReact.Fragmentnormally.jsxFactorysupport – if you setjsxFactoryto"h", when using the classic JSX runtime, it will runhinstead ofcreateElement
This makes it easier to use @emotion/react, preact, and other JSX runtimes with Bun.
Bug fixes
- [fetch] Fix bug with HTTP request bodies for http (not https) requests
- Fix JSX transform edgecase with static children to match Babel's behavior (static ===
children.length > 1) - Fix node_module resolver edgecase when resolving from the dev server (not
bun bun) that happened when resolving workspace packages above the project root that expect dependencies from the project. This applied to pnpm
Other:
- Add a small end-to-end test for emotion JSX
- Add a small end-to-end test for React Context.Provider & Context.Consumer
- Add analytics