Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nest buid produces incorrect result when using composite TS compiler option #4903

Closed
arikon opened this issue Jun 14, 2020 · 2 comments
Closed
Labels
needs triage This issue has not been looked into

Comments

@arikon
Copy link

arikon commented Jun 14, 2020

Bug Report

Current behavior

nest build produces only assets in the outDir

Input Code

tsconfig.json

{
    "compilerOptions": {
      "composite": false,
      "outDir": "dist",
      "rootDir": "src"
    },
    "exclude": ["node_modules", "dist"]
}

tsconfig.build.json

{
    "extends": "./tsconfig.json",
    "exclude": ["node_modules", "test", "dist", "**/*spec.ts"]
}

nest-cli.json

{
    "collection": "@nestjs/schematics",
    "sourceRoot": "src",
    "compilerOptions": {
        "deleteOutDir": true,
        "assets": [
            {
                "include": "config/YandexInternalRootCA.crt"
            }
        ],
        "watchAssets": false
    }
}
$ tree dist
dist
└── config
    └── YandexInternalRootCA.crt

1 directory, 1 file
$ tree src
src
├── app.controller.spec.ts
├── app.controller.ts
├── app.module.ts
├── app.service.ts
├── config
│   ├── YandexInternalRootCA.crt
│   └── database.ts
├── entity
│   ├── FuelCard.ts
│   ├── FuelCardBalance.ts
│   ├── FuelCardBalanceHistory.ts
│   ├── FuelType.ts
│   ├── FuelingOperation.ts
│   ├── LimitType.ts
│   └── Refueller.ts
├── fuel-card
│   ├── fuel-card.controller.spec.ts
│   ├── fuel-card.controller.ts
│   ├── fuel-card.module.ts
│   ├── fuel-card.service.spec.ts
│   └── fuel-card.service.ts
└── main.ts

3 directories, 19 files

Expected behavior

nest build correctly compiles the code

Possible Solution

Environment


Nest version: 7.1.3

 
For Tooling issues:
- Node version: v12.17.0
- Platform: Mac

Others:

@arikon arikon added the needs triage This issue has not been looked into label Jun 14, 2020
@jmcdo29
Copy link
Member

jmcdo29 commented Jun 14, 2020

Please provider a minimum reproduction.

@kamilmysliwiec
Copy link
Member

The composite mode is not supported nestjs/nest-cli#392. For this, use native tsc compilation instead of nest build

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs triage This issue has not been looked into
Projects
None yet
Development

No branches or pull requests

3 participants