Skip to content

Minimal example of suboptimal code generation with babel on JSX prop spreading

Notifications You must be signed in to change notification settings

bz2/example-babel-jsx-spread

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Example for preact issue 2773

Minimal reproduction code generation issue with babel and new JSX transformation with preact 10.5.x release.

See Introducing the New JSX Transform blog post for background on the code generation change.

Usage

$ npm install

Then inspect dist/main.js compiled result.

Closing

With improvements to the babel transform process, including babel issue 12557 fixed, sensible code now gets generated:

function App(_ref) {
  var style = _ref.style;
  return jsxRuntime_module_o("h1", {
    style: style,
    children: "Title"
  });
}

About

Minimal example of suboptimal code generation with babel on JSX prop spreading

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published