Luoruize
Luoruize

Reputation: 688

Compiling jsx files on windows

I have installed react-tools using npm:

npm -g install react-tools

I have a folder called "test", under which I have the folder containing the .jsx files, called "a1", and a destination directory to hold the .js files, called "a2". So I do this:

c:\test> jsx -w a1 a2

and it just displays [], probably meaning that it can't locate any files. On my Mac it works perfectly, but I'm working on a .Net project so I have to use windows.

I did look at the similar question here, but I'm still getting the same result. I have no problem using other tools, but I have to have my .jsx compiled to .js.

Upvotes: 0

Views: 1337

Answers (1)

Jonny Buchanan
Jonny Buchanan

Reputation: 62793

From the Productionizing: Precompiled JSX docs:

By default JSX files with a .js extension are transformed. Use jsx --extension jsx src/ build/ to transform files with a .jsx extension.

Upvotes: 1

Related Questions