private static void InitializeRazorReact() { //var reactBundle = new ReactBundle(@"~\ReactScripts\main.bundle.js"); var distPath = Path.GetFullPath(Path.Combine(HttpContext.Current.Server.MapPath(""), "..", "react-sample-app", "dist")); var reactServerSideBundle = new ReactBundle(null, new[] { @"~/Scripts/react/server/main.bundle.js", @"~/Scripts/react/server/runtime.bundle.js", @"~/Scripts/react/server/vendors~main.bundle.js", }); var reactClientSideBundle = new ReactBundle(null, new[] { @"~/Scripts/react/client/main.bundle.js", @"~/Scripts/react/client/runtime.bundle.js", @"~/Scripts/react/client/vendors~main.bundle.js", }); //RazorReactConfiguration.AddReactManager(new RazorReactManager(reactServerSideBundle, reactClientSideBundle, new ChakraCoreJsEngineFactory(), new RazorReactOptions() { LiveReloadDevMode = true })); RazorReactConfiguration.AddReactManager(new RazorReactManager(reactServerSideBundle, reactClientSideBundle, new V8JsEngineFactory(), new RazorReactOptions() { LiveReloadDevMode = true })); RazorReactConfiguration.Initialize(); }
public RazorReactManager(ReactBundle reactServerSideBundle, ReactBundle reactClientSideBundle, IJsEngineFactory jsEngineFactory, RazorReactOptions options = null) : base(reactServerSideBundle, reactClientSideBundle, new ServerPathMapper(), jsEngineFactory, options) { }