Skip to content
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

Merged
merged 4 commits into from Jul 23, 2019

Conversation

nerrad
Copy link
Contributor

@nerrad nerrad commented Jul 18, 2019

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 of React.createElement. Note, any dependencies that import react will still use react.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

  • Impacts Event Attendees block so ensure it still works as expected (breakage would result in it not loading/working at all, so easy to verify).
  • Impacts exit modal on plugins page for EE deactivation because the exit modal package depends on React. Easy to verify, if it shows up then it's working.
  • Make sure there are no console errors related to the above when testing (there are some in the block editor but are unrelated to these changes and pre-existing).

Checklist

@@ -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',
Copy link
Member

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

Copy link
Contributor Author

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.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in ffb080c

@nerrad nerrad force-pushed the BUG/build-files-with-wp-element-not-react branch from 469a958 to ffb080c Compare July 22, 2019 13:45
@nerrad nerrad requested a review from tn3rb July 22, 2019 13:45
@tn3rb tn3rb merged commit 07b50fd into master Jul 23, 2019
@tn3rb tn3rb deleted the BUG/build-files-with-wp-element-not-react branch July 23, 2019 01:28
eeteamcodebase pushed a commit that referenced this pull request Jul 23, 2019
…d files with wp element not react (fixes #953) (#1425)

* remove unnecessary transform config

* update build files (dev)

js_only

* remove unnecessary comment block

js_only
"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants