ReactDevelopmentServerMiddlewareExtensions.UseReactDevelopmentServer Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Handles requests by passing them through to an instance of the create-react-app server. This means you can always serve up-to-date CLI-built resources without having to run the create-react-app server manually.
This feature should only be used in development. For production deployments, be sure not to enable the create-react-app server.
public:
[System::Runtime::CompilerServices::Extension]
static void UseReactDevelopmentServer(Microsoft::AspNetCore::SpaServices::ISpaBuilder ^ spaBuilder, System::String ^ npmScript);
public static void UseReactDevelopmentServer (this Microsoft.AspNetCore.SpaServices.ISpaBuilder spaBuilder, string npmScript);
static member UseReactDevelopmentServer : Microsoft.AspNetCore.SpaServices.ISpaBuilder * string -> unit
<Extension()>
Public Sub UseReactDevelopmentServer (spaBuilder As ISpaBuilder, npmScript As String)
Parameters
- spaBuilder
- ISpaBuilder
The ISpaBuilder.
- npmScript
- String
The name of the script in your package.json file that launches the create-react-app server.