-
-
Notifications
You must be signed in to change notification settings - Fork 942
transformer: `// @jsxFrag `` generates invalid code #16653
Copy link
Copy link
Labels
A-transformerArea - Transformer / TranspilerArea - Transformer / Transpiler
Milestone
Description
// @jsxRuntime classic
console.log(<></>) // @jsxFrag `is transformed to
// @jsxRuntime classic
console.log(/* @__PURE__ */ React.createElement(`, null));. But this should be
// @jsxRuntime classic
console.log(/* @__PURE__ */ React.createElement(React.Fragment, null));(the pragma comment should be ignored).
playground
Probably a warning should be output like esbuild does (esbuild try).
related: evanw/esbuild@2102e06
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
A-transformerArea - Transformer / TranspilerArea - Transformer / Transpiler
Type
Fields
Give feedbackPriority
None yet
Effort
None yet