`nest build` ignores tsconfig exclude option
See original GitHub issueBug Report
Current behavior
nest build
ignores tsconfig.json
’s exclude
option. e.g.: I want to exclude scripts
folder from compiling and this works with tsc
. But when I run nest build
, scripts
folder is also compiled and copied to dist
.
Input Code
Inside tsconfig.json
:
"exclude": ["node_modules", "dist", "uploads", "static", "scripts"]
Expected behavior
nest build
should obey tsconfig
excludes.
Possible Solution
Environment
Nest version: 7.0.1
For Tooling issues:
- Node version: 13.7.0
- Platform: Linux 4.4
Others:
Yarn: 1.22.4
Issue Analytics
- State:
- Created 4 years ago
- Comments:7 (2 by maintainers)
Top Results From Across the Web
Why 'exclude' option is not working in tsconfig? - Stack Overflow
First I would check node versions, yarn version etc. I successfully tried the template using yarn build node v14.7.0 yarn v1.22 ...
Read more >Exclude a Folder from compilation with tsconfig.json in TS
Use the `exclude` option in your `tsconfig.json` file to exclude a folder from compilation in TypeScript. The `exclude` option changes what the `include` ......
Read more >exclude - TSConfig Option - TypeScript
TypeScript in 5 minutes. An overview of building a TypeScript web app. TSConfig Options. All the configuration options for a project.
Read more >Mark .d.ts.map files as excluded and nest them under ...
Our project uses declarationMap in tsconfig.json because it is opened with other editors that rely on TypeScript's declarationMap feature.
Read more >API - ESBuild
Tsconfig ; Working directory. #Simple options. #Alias. Supported by: Build. This feature lets you substitute one package for another when bundling ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Please, provide a minimal repository which reproduces your issue.
From what I’ve reproduced, it works as expected.
extends
only extends properties in the top level, which means, theexclude
array defined intsconfig.json
will be overridden by what is specified intsconfig.build.json
. You need to specify everything defined intsconfig.json
exclude
plus the new ones also, intsconfig.build.json
. Hope this helps. @VFC-elindgren