Skip to content
Go to file

Latest commit


Git stats


Failed to load latest commit information.
Latest commit message
Commit time


.NET 5.0 simple + lite (npm-free) React SPA using TypeScript with integrated bundling + hot reloading

Browse source code and view live demo

Install with x dotnet tool:

$ dotnet tool install -g x

$ x new react-lite ProjectName


This template goal is to provide the richest suite of functionality with the least amount of complexity. TypeScript was adopted because it runs as a non-invasive global tool with no dependencies that enables us to use the latest JavaScript language features to be able to develop with the same source code as a fully-fledged npm webpack build system should you wish to upgrade to one in future.

Development workflow

All that's needed during development is to run TypeScript in "watch" mode:

$ tsc -w

Which monitors any changes to any .ts files and incrementally compiles their .js files on save. ServiceStack's built-in static files hot-reloading detects changes to any .js files to automatically reload the page, whilst the built-in dynamic .html page monitors for changes to any of its dependent resources.

In a new Terminal window start your .NET Web App HTTP Server with:

$ dotnet watch run

Using watch run will monitor changes to C# source files where it will automatically re-build and restart the Server.

After changing your ServiceStack Services, you can re-generate their Typed TypeScript DTOs with:

$ x ts


The integrated .js and .css bundling is configured to use a fast unminified in-memory bundle for an optimal development experience whilst it utilizes an advanced minified bundle in production releases.

When publishing, the project's Bundle task:

<Target Name="Bundle" BeforeTargets="AfterPublish">
    <Exec Command="x run -to /bin/Release/net5/publish/wwwroot" />

Runs to produce an optimized, minified & hashed bundle using ServiceStack's built-in bundling embedded in the dotnet tools which is pre-configured to use NUglify's advanced compression.

Publishing and Deployment

The standard .NET Core tools can be used to publish:

$ dotnet publish -c Release

Then deploy as normal, e.g. via rsync deployments to Linux or to an AWS EC2 container using Docker.


.NET 5.0 simple + lite (npm-free) React SPA using TypeScript



No packages published