小编Mic*_*man的帖子

在Angular CLI中从ng-build中排除模块...不起作用

我有一个带有两个应用程序的Angular CLI项目。这两个应用程序是相同的,但是一个应用程序包含构建中的所有文件,另一个则需要排除模块。

Angular CLI版本:1.7.4 Angular版本:5.2.10

我将两个应用程序添加到angular-cli.json文件中,每个应用程序都有一个单独的ts-config文件。

  "apps": [
    {
      "name": "app",   <---- first app
      "root": "src",
      "outDir": "/wwwroot",
      "assets": [
        "assets",
        "favicon.ico"
      ],
      "index": "index.html",
      "main": "main.ts",
      "polyfills": "polyfills.ts",
      "test": "test.ts",
      "tsconfig": "tsconfig.app.json",       <----first TS config
      "testTsconfig": "tsconfig.spec.json",
      "prefix": "app",
      "styles": [
        "styles.scss"
      ],
      "scripts": [],
      "environmentSource": "environments/environment.ts",
      "environments": {
        "dev": "environments/environment.ts",
        "prod": "environments/environment.prod.ts"
      }
    },
    {
      "name": "admin",   <---- second app
      "root": "src",
      "outDir": "/wwwroot",
      "assets": [
        "assets",
        "favicon.ico"
      ],
      "index": "index.html",
      "main": "main.ts",
      "polyfills": "polyfills.ts",
      "test": "test.ts",
      "tsconfig": …
Run Code Online (Sandbox Code Playgroud)

typescript tsconfig angular-cli angular angular5

5
推荐指数
1
解决办法
5418
查看次数

标签 统计

angular ×1

angular-cli ×1

angular5 ×1

tsconfig ×1

typescript ×1