Author : HASSAN MD TAREQ | Updated : 2021/06/08

What is Single Page Application?

Blazor WebAssembly

Add following to .csproj file

<PropertyGroup>
  <PublishIISAssets>true</PublishIISAssets>
</PropertyGroup>

Now use Visual Studio publish (make sure you logged into Azure portal using your Azure credentials)

Deploy using Kudo

Angular App

Install @angular-devkit/build-angular

npm install --save-dev @angular-devkit/build-angular

To avoid build error (i.e. Error: scripts.d14xxxxxxxxx5fa.js from Terser), change setting in angular.json

angular.json

"configurations": {
	"production": {
	  "fileReplacements": [
		{
		  "replace": "src/environments/environment.ts",
		  "with": "src/environments/environment.prod.ts"
		}
	  ],
	  "optimization": false,
	  "outputHashing": "all",
	  "sourceMap": false,
	  "namedChunks": false,
	  "extractLicenses": true,
	  "vendorChunk": false,
	  "buildOptimizer": true,
	  "budgets": [
		{
		  "type": "initial",
		  "maximumWarning": "15mb",
		  "maximumError": "20mb"
		},
		{
		  "type": "anyComponentStyle",
		  "maximumWarning": "6kb",
		  "maximumError": "10kb"
		}
	  ]
	}
}

Build angular project

ng build --prod --aot

Now deploy Angular app to Azure App Service

Deploy Angular App to Azure App Service Step 1

Deploy Angular App to Azure App Service Step 2

Deploy Angular App to Azure App Service Step 3