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

Embed JSX filename paths relative to repo root #6778

Merged
merged 1 commit into from
May 16, 2016

Conversation

sophiebits
Copy link
Contributor

Test Plan: Changed the preprocessor to log the output of babel.transform and saw

var _jsxFileName = 'src/isomorphic/modern/element/__tests__/ReactJSXElementValidator-test.js';

in the resulting output, instead of an absolute path.

@zpao

Test Plan: Changed the preprocessor to log the output of babel.transform and saw

```
var _jsxFileName = 'src/isomorphic/modern/element/__tests__/ReactJSXElementValidator-test.js';
```

in the resulting output, instead of an absolute path.
@zpao
Copy link
Member

zpao commented May 16, 2016

👍

@sophiebits sophiebits merged commit 6afd510 into facebook:master May 16, 2016
@zpao
Copy link
Member

zpao commented May 16, 2016

Question as I look at this and #6398 - this transform only affects our tests right? 6398 adds the info to the warning so others will get if if they use that transform but we only have JSX in our tests so it shouldn't affect prod (eg, we'll never ship anything with _jsxFileName in it).

@sophiebits
Copy link
Contributor Author

Right. For our purposes it would probably be fine to only apply the transform in tests (though of course most apps will want to always enable it in dev mode – we'll have to tell people in the next release notes).

@zpao zpao added this to the 15-next milestone Jun 1, 2016
zpao pushed a commit to zpao/react that referenced this pull request Jun 8, 2016
Test Plan: Changed the preprocessor to log the output of babel.transform and saw

```
var _jsxFileName = 'src/isomorphic/modern/element/__tests__/ReactJSXElementValidator-test.js';
```

in the resulting output, instead of an absolute path.
(cherry picked from commit 6afd510)
zpao pushed a commit that referenced this pull request Jun 14, 2016
Test Plan: Changed the preprocessor to log the output of babel.transform and saw

```
var _jsxFileName = 'src/isomorphic/modern/element/__tests__/ReactJSXElementValidator-test.js';
```

in the resulting output, instead of an absolute path.
(cherry picked from commit 6afd510)
@zpao zpao modified the milestones: 15-next, 15.2.0 Jun 14, 2016
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.

2 participants