-
Notifications
You must be signed in to change notification settings - Fork 920
Closed
Labels
Milestone
Description
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")
See #90