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

Build: Invert JSX pragma application condition #7701

Merged
merged 1 commit into from
Jul 4, 2018

Conversation

aduth
Copy link
Member

@aduth aduth commented Jul 3, 2018

Related: #7493

This pull request seeks to resolve an issue where making changes to a packages file which includes JSX will cause the JSX pragma to not be injected correctly, resulting in errors when reloading the editor after the rebuild completes. This is because the watch task for plugin build runs a rebuild in a subprocess which does not inherit the TRANSFORM_JSX_PRAGMA environment variable used to include the plugin necessary for pragma injection.

The changes in this pull request invert the condition to a "skip" environment variable, used exclusively in the prebuild step for transpiling the babel-plugin-import-jsx-pragma package.

Testing instructions:

  1. Run npm run dev
  2. Make a change to packages/data/src/index.js and save the file
  3. Reload the editor once the rebuild has completed
  4. Observe there are no errors

@aduth aduth added [Type] Bug An existing feature does not function as intended [Type] Build Tooling Issues or PRs related to build tooling labels Jul 3, 2018
Copy link
Member

@gziolo gziolo left a comment

Choose a reason for hiding this comment

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

Yes, it makes sense as in fact we want to skipt it for itself. I will test it later today.

Copy link
Member

@gziolo gziolo left a comment

Choose a reason for hiding this comment

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

Tests well 🚢

@gziolo gziolo merged commit 93ed7f7 into master Jul 4, 2018
@gziolo gziolo deleted the fix/build-jsx-pragma-watch branch July 4, 2018 11:10
@gziolo gziolo added this to the 3.2 milestone Jul 4, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Type] Bug An existing feature does not function as intended [Type] Build Tooling Issues or PRs related to build tooling
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants