Bug Report
🔎 Search Terms
- jsx
- React
react-jsx
- transform
void 0
🕗 Version & Regression Information
- This is the behavior in every version I tried, and I reviewed the FAQ for entries about JSX
⏯ Playground Link
Playground link with relevant code
💻 Code
export const el = <div>foo</div>;
tsconfig.json:
🙁 Actual behavior
import { jsx as _jsx } from "react/jsx-runtime";
export const el = _jsx("div", { children: "foo" }, void 0);
🙂 Expected behavior
import { jsx as _jsx } from "react/jsx-runtime";
export const el = _jsx("div", { children: "foo" });
This is how it works in Babel: Babel playground.
I just tried to migrate our codebase at Unsplash to use the new JSX transform but I noticed a cumulative increase of 5 KB across all chunks. If we can remove the extraneous void 0, this should help reduce the bundle size.
Twitter thread for reference: https://twitter.com/OliverJAsh/status/1481912497175203840
Bug Report
🔎 Search Terms
react-jsxvoid 0🕗 Version & Regression Information
⏯ Playground Link
Playground link with relevant code
💻 Code
tsconfig.json:🙁 Actual behavior
🙂 Expected behavior
This is how it works in Babel: Babel playground.
I just tried to migrate our codebase at Unsplash to use the new JSX transform but I noticed a cumulative increase of 5 KB across all chunks. If we can remove the extraneous
void 0, this should help reduce the bundle size.Twitter thread for reference: https://twitter.com/OliverJAsh/status/1481912497175203840