'i don't understand why the build create 2 folders en in the dist

I'm trying to build my angular app in differente languages but it creates 2 folders in dist (dist/en/en), and i don't know why here is the angular.json

"projects": {
  "Front21": {
    "projectType": "application",
    "schematics": {
      "@schematics/angular:application": {
        "strict": true
      }
    },
    "root": "",
    "sourceRoot": "src",
    "i18n": {
      "sourceLocale": "fr-FR",
      "locales": {
        "en": {
          "translation": "src/translation/messages.en.xlf"
        }
      }
    },
    "prefix": "app",
    "architect": {
      "build": {
        "builder": "@angular-devkit/build-angular:browser",
        "options": {
          "outputPath": "dist",
          "index": "src/index.html",
          "main": "src/main.ts",
          "polyfills": "src/polyfills.ts",
          "tsConfig": "tsconfig.app.json",
          "assets": ["src/favicon.ico", "src/assets"],
          "styles": [
          ],
          "scripts": [
          ]
        },
        "configurations": {
          "production": {
            "budgets": [
              {
                "type": "initial",
                "maximumWarning": "5mb",
                "maximumError": "10mb"
              },
              {
                "type": "anyComponentStyle",
                "maximumWarning": "2kb",
                "maximumError": "1mb"
              }
            ],
            "fileReplacements": [
              {
                "replace": "src/environments/environment.ts",
                "with": "src/environments/environment.prod.ts"
              }
            ],
            "outputHashing": "all"
          },
          "en": {
            "localize": ["en"],
            "outputPath": "dist/en/",
            "i18nMissingTranslation": "error",
            "baseHref": "/en"
          },
        },
        "defaultConfiguration": "production"
      },

    }
  }
},

and i build using this

"build": "ng build && ng build --configuration=en",

more over the only url that works is https://url/en/en/ and every other url doesn't work ( https://url/en/en/page )



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source