Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Enable JSX source plugin in DEV and integrate it with React DevTools
Summary: The `env` option has been broken in Babel for a while (babel/babel#4539), and will be deprecated (babel/babel#5276). I am changing this code to the way Babel < 6.10 interpreted the `env` option. This should fix the `__source` JSX transform which was applied in DEV in the past, but stopped getting applied because of the Babel bug. I also changed the `filename` passed by Babel to be relative (currently, to `fbsource` but open to other options). This way DEV builds are still reproducible. This still needs some help from davidaurelio to make the root location more foolproof. I'd also appreciate zertosh taking a look in case there's a better way to "anchor" the relative path. All I need is to for `react-third-party/react-devtools/react-devtools` and `babelTransformer.js` to agree on what the relative path base is. Closes facebook#13893 Reviewed By: gaearon Differential Revision: D5035892 Pulled By: davidaurelio fbshipit-source-id: 19ffeb867d7ed5928e9de05dcec9ba85bf961dd5
- Loading branch information