andreypopp / reactify

[DEPRECATED] Browserify transform for JSX (superset of JavaScript used in React library by Facebook)
MIT License
690 stars 68 forks source link

Surface nonStrictEs6module option #58

Closed danvk closed 8 years ago

danvk commented 9 years ago

non-strict-es6-module is a new option to jsx and react-tools transform which must be set to enable type imports in Flow. It should be possible to set this in reactify.

Or, let the user specify options to pass directly to transform so that this is never an issue again?

TimeBomb commented 9 years ago

The original pull request for this nonStrictEs6Module flag and the es6module flag can be found at https://github.com/facebook/react/pull/3143, which includes specific information about them. Unfortunately not officially documented yet, so it appears.

ezmiller commented 9 years ago

How does one set these flags in a Grunt configuration when using browserify and reactify as a transform? I created a stackoverflow question about this.

danvk commented 9 years ago

Here's my fix: https://github.com/andreypopp/reactify/pull/59

MatthewHerbst commented 9 years ago

Any updates here? I'm running into this problem (as seen in #60 ) also.

danvk commented 9 years ago

Can you use jstransformify instead of reactify? I recently made some changes to make its interface more like reactify.

MatthewHerbst commented 9 years ago

@danvk When I switched my transform from

bundler.transform(reactify, {es6:true});

to

bundle.transform(jstransformify);

I get the error:

Error: while transforming /Users/mherbst/Repos/data-validation-tool/src/client/js/app.jsx:Error: Parse Error: Line 1: Illegal import declaration
MatthewHerbst commented 9 years ago

I was able to use babelify instead of reactify and it solved all my problems.

andreypopp commented 9 years ago

Yeah, reactify is pretty much deprecated now as babel is replacing jstransform.

DannyvanderJagt commented 9 years ago

@MatthewHerbst Thank you that worked for me too!

alex179ohm commented 9 years ago

@MatthewHerbst Tanks! babelify works fine for me too