When you create new project using
dotnet new react template, you'll get ASP.NET Core application with
ClientApp folder for SPA frontend. This may be convenient if you full-stack developer, you have exactly one SPA and you write frontend from ground-up yourself.
dotnet new react has many downsides and you'll tend to extract
ClientApp to dedicated folder:
- If team has dedicated frontend developers, they may find more convenient to develop SPA in dedicated folder or dedicated git repository.
dotnet new reacttemplate's dependencies are outdated, and frontend developers forced to execute
yar create react-appmanually then diff/copy output to
yarn create react-app --template typescript, then diff/copy output to
dotnet new react- is not the tool for frontend developers after all :)
- It's scales poorly. Imagine you have more than one SPA with common shared components. You'll end up with monorepo in dedicated folder using yarn workspaces and lerna.
In this post I'll show how to publish ASP.NET Core web application along with SPA from dedicated monorepo folder.