I\'ve googled alot, and i haven\'t figured out how to do it. I have a web app that i would like to deploy on azure. I generates the link but the Routes that use my React compone
Most likely, there is not installed the Internet Explorer 9+ (or Microsoft Edge) on your server and you did not install native assemblies for the JavaScriptEngineSwitcher.V8 and JavaScriptEngineSwitcher.ChakraCore modules.
Also I recommend you to read the “Misconceptions about the JavaScript Engine Switcher version 2.X” discussion.
That's because JavaScript Engine you have on your PC and not in Azure. Taken from: https://github.com/reactjs/React.NET/issues/400 (actually a complete instruction on how to get React working)
I was able to get the application working when published to Azure using a combination of these guides:
http://www.samulihaverinen.com/web-development/dotnet/2016/01/19/how-to-run-clearscript-v8-javascript-engine-in-azure/
https://github.com/Taritsyn/JavaScriptEngineSwitcher/wiki/Registration-of-JS-engines
From the first guide, I installed dependencies separately:
Uninstall-Package React.AspNet
Install-Package JavaScriptEngineSwitcher.Core
Install-Package JavaScriptEngineSwitcher.Msie (May not be needed)
Install-Package JSPool
Install-Package JavaScriptEngineSwitcher.ChakraCore
Install-Package JavaScriptEngineSwitcher.ChakraCore.Native.win-x64 (Selected native implementation)
Install-Package Microsoft.ChakraCore (I think this is key to enabling ChakraCore on the server)
Install-Package React.AspNet -IgnoreDependencies
From the second guide, I installed a package to enable JavaScriptEngineSwitcher configuration in .NET Core 1.X:
Install-Package JavaScriptEngineSwitcher.Extensions.MsDependencyInjection
In Startup.cs
ConfigureServices():
services.AddJsEngineSwitcher(options => options.DefaultEngineName = ChakraCoreJsEngine.EngineName).AddChakraCore();