-
Notifications
You must be signed in to change notification settings - Fork 2.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Build the React JSX runtime into a new WordPress script #6678
Conversation
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the Core Committers: Use this line as a base for the props when committing in SVN:
To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
@@ -111,8 +109,6 @@ module.exports = function ( | |||
'objectFitPolyfill/dist/objectFitPolyfill.min.js', | |||
'wp-polyfill-inert.min.js': 'wicg-inert/dist/inert.min.js', | |||
'moment.min.js': 'moment/min/moment.min.js', | |||
'react.min.js': 'react/umd/react.production.min.js', | |||
'react-dom.min.js': 'react-dom/umd/react-dom.production.min.js', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also just like the backported PR, this moves react scripts we used in Core from the deprecated umd builds to CJS.
Test using WordPress PlaygroundThe changes in this pull request can previewed and tested using a WordPress Playground instance. WordPress Playground is an experimental project that creates a full WordPress instance entirely within the browser. Some things to be aware of
For more details about these limitations and more, check out the Limitations page in the WordPress Playground documentation. |
See WordPress/gutenberg#61692. See #6678. Props youknowriad. Fixes #61324. git-svn-id: https://develop.svn.wordpress.org/trunk@58271 602fd350-edb4-49c9-b593-d223f7449a82
Trac ticket: https://core.trac.wordpress.org/ticket/61324
Backports Gutenberg PR WordPress/gutenberg#61692
This PR adds the necessary webpack config to build the React JSX Runtime script and adds the script to WordPress. Without this, the next package update on Core will be blocked as the new packages are going to be using the new JSX Runtime.
For the moment though, you can test that the PR adds the
react-jsx-runtime
script towp-includes/js/dist/vendor/react-jsx-runtime.js
Also if you load manually the
react-jsx-runtime
in WordPress, you'll see the ReactJSXRuntime global available in the console.