-
Notifications
You must be signed in to change notification settings - Fork 927
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
Use Babel to transform JS #138
Comments
I suppose this means I should close #131 and instead look at how difficult it'd be to support Babel. |
Probably. You're welcome to use newer JSXTransformer (or even just browserify latest JSTransform, which includes JSX, directly), we just won't support it officially. |
+1 Babel integration would be excellent. It has good JSX support and heaps of ES6 features. |
@locksmithdon You can use Babel with ReactJS.NET today via Webpack (see the documentation at http://reactjs.net/guides/webpack.html). This update would just be for when you hit .jsx files in your browser directly without using any other third-party tools, or use a .NET minification library (like Cassette or Microsoft's one) |
FWIW, we have been using Babel with ReactJS.NET and precompiling via Browserify + Babelify and gulp for quite awhile. We did it primarily for the ES6 transforms. Works great! I could write up a quick guide if there was interest. |
@jslatts - There's some docs on Webpack (http://reactjs.net/guides/webpack.html) which I'm going to update to use Babel rather than JSXTransformer, but I'd be happy to add some docs for Browserify too. The docs are in the same repo, the source for the Webpack one is here: https://github.com/reactjs/React.NET/blob/master/site/jekyll/guides/webpack.md A sample project would be great too. Something like the current React.Samples.Webpack but for Browserify. |
- Remove JSXTransformer and instead use "browser" build of Babel - Remove useHarmony and stripTypes settings (no longer relevant) - Remove obsolete `LoadJsxFile` and `TransformJsx` from `IReactEnvironment` - These have been marked as obsolete for a long time now #138
Mostly done in dd75222. There's still a few things I'd like to do (eg. allow configuration of Babel options) but the basic stuff is there. |
We're likely going to stop supporting JSXTransformer soon. Babel has something similar so it should be relatively easy to swap in, with the upside that more ES* features are supported and they are implemented and fixed faster.
The text was updated successfully, but these errors were encountered: