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

Projects
None yet
2 participants
@aduth
Member

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
@gziolo

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

@gziolo

gziolo approved these changes Jul 4, 2018

Tests well 🚢

@gziolo gziolo merged commit 93ed7f7 into master Jul 4, 2018

2 checks passed

codecov/project 46.61% remains the same compared to 9f5c9d2
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details

@gziolo gziolo deleted the fix/build-jsx-pragma-watch branch Jul 4, 2018

@gziolo gziolo added this to the 3.2 milestone Jul 4, 2018

sarahmonster added a commit that referenced this pull request Jul 9, 2018

Build: Invert JSX pragma application condition (#7701)
Introduce a little bit of spacing before labels in post preview panels.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment