You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It's becoming more and more common to use external build systems (Gulp, Grunt) or bundlers (Webpack, Browserify) that handle the JSX transformation. The output of these can be loaded directly into ReactJS.NET as it's just vanilla JavaScript. Currently ReactJS.NET still loads JSXTransformer and runs the file through it, even though it's not necessary as the transformation has already occured externally. Add flag to AddScript to tell ReactJS.NET to not execute JSXTransformer on the code.
Pick one of these:
ReactConfiguration.Configuration
// Option 1: `transform` flag, defaults to true
.AddScript("~/js/server.bundle.js", transform: false)
// Option 2: `doNotTransform` flag, defaults to false
.AddScript("~/js/server.bundle.js", doNotTransform)
// Option 3: Totally separate method
.AddRawScript("~/js/server.bundle.js")
.AddScriptWithoutTransform("~/js/server.bundle.js")
The only problem I had with that is it's quite long, but at least it describes what it's doing (and you'd probably only have one bundle file you're adding anyways)
It's becoming more and more common to use external build systems (Gulp, Grunt) or bundlers (Webpack, Browserify) that handle the JSX transformation. The output of these can be loaded directly into ReactJS.NET as it's just vanilla JavaScript. Currently ReactJS.NET still loads JSXTransformer and runs the file through it, even though it's not necessary as the transformation has already occured externally. Add flag to
AddScript
to tell ReactJS.NET to not execute JSXTransformer on the code.Pick one of these:
See #90
The text was updated successfully, but these errors were encountered: