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
BUG: Build files with wp element not react (fixes #953) #1425
Conversation
@@ -7,7 +7,6 @@ module.exports = function( api ) { | |||
], | |||
plugins: [ | |||
/** this is needed because plugin exit modal uses react not wp.element */ | |||
'@babel/transform-react-jsx', |
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.
what about the comment right above this line?
this is needed because plugin exit modal uses react not wp.element
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.
oh ya, the comment could have been removed too! Dunno how I missed that.
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.
Fixed in ffb080c
469a958
to
ffb080c
Compare
Problem this Pull Request solves
See #953 for background. Basically this pull removes a configuration from the babel configuration file so that built files for the EE assets use
wp.element.createElement
instead ofReact.createElement
. Note, any dependencies that importreact
will still usereact.createElement
but that still utilizes the WP external via the dependency extractor plugin (which effectively means that the version of react used will always be whatever is bundled with WP).How has this been tested
Checklist
esc_html__()
, see https://codex.wordpress.org/I18n_for_WordPress_Developers)