chesco
chesco

Reputation: 89

ReactJS.net on Azure

I'm hoping I'm able to get some help out there with people with more experience on ReactJS than me. I'm using MVC 5 with ReactJS (using ReactJS.net to take care of the translation from JSX to js) and I was able to some stuff done that works pretty well. Testing the my code on my local pc works fine for debugging, but once I publish it to Azure for testing I get this error:

GET http://mywebsite.azurewebsites.net/Scripts/jsx/FriendSelect.jsx?_=1429662139230 404 (Not Found)

This is usually the error I get when the jsx file doesn't get converted to js successfully. Does anyone know the steps I need to take to get ReactJS.net to work properly on Azure?

Upvotes: 0

Views: 735

Answers (1)

Chris Hawkes
Chris Hawkes

Reputation: 12410

I don't understand why you need to use anything react.net etc...? React comes with a JSXTransformer file which transforms your JSX to JS while you're in the process of developing your site. Compiled and minified JS code should be used in production once you no longer need JSX. Tools like Gulp can assist with automatically minifying your code for you.

Whether the site is Azure, Linux Ubuntu or anything else it shouldn't matter.

Upvotes: 1

Related Questions