Including Web.config While Taking Build in Angular 15 or Less

To Include Web.config file in dest folder while taking build in Angular, you can modify the angular.json file as follows:


(Note: We need to include Web.config file inside the src folder.)

In build declaration, we can define the web config inside the block of assets.

   "build": {
          "builder": "@angular-devkit/build-angular:browser",
          "options": {
            "outputPath": "dist",
            "index": "src/index.html",
            "main": "src/main.ts",
            "polyfills": "src/polyfills.ts",
            "tsConfig": "",
            "inlineStyleLanguage": "scss",
            "assets": [
            "styles": [
            "scripts": [

Another Way

In build declaration inside the asset block we can define the we.config with input and output.

                "glob": "**/*",
                "input": "node_modules/ng2-pdfjs-viewer/pdfjs",
                "output": "assets/pdfjs"

Similar Articles