[babel 8] Use the JSX automatic runtime by default#12630
Conversation
Co-authored-by: Nicolò Ribaudo <[email protected]>
| runtime: RUNTIME_DEFAULT = process.env.BABEL_8_BREAKING | ||
| ? "automatic" | ||
| : development | ||
| ? "automatic" | ||
| : "classic", |
There was a problem hiding this comment.
This is not
RUNTIME_DEFAULT = process.env.BABEL_8_BREAKING || development
? "automatic"
: "classic",So that at build time it is easily converted to development ? "automatic" : "classic" or "automatic" depending on BABEL_8_BREAKING.
|
Build successful! You can test your changes in the REPL here: https://babeljs.io/repl/build/37551/ |
|
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. Latest deployment of this branch, based on commit d99f468:
|
| var div = /*#__PURE__*/React.createElement(Component, Object.assign({}, props, { | ||
| var _reactJsxRuntime = require("react/jsx-runtime"); | ||
|
|
||
| var div = /*#__PURE__*/_reactJsxRuntime.jsx(Component, Object.assign({}, props, { |
There was a problem hiding this comment.
It doesn't matter to keep this test as classic or not right?
There was a problem hiding this comment.
I think it's ok to use the automatic runtime, since it still tests that the transform-to-object-assign works on the JSX transform output.
process.env.BABEL_8_BREAKINGBackport of #11436 / b31ebbe.