tsconfig.json 中排除和包含的奇怪问题

问题描述 投票:0回答:1

我有一个奇怪的问题。当我这么做的时候

"exclude": [
    "node_modules",
    "**/__tests__",
    "**/*.test.*",
    "**/server-handlers/**/*",
    "**/*.stories.*",
    "tmp/components/form-controls/company-search",
    "tmp/components/form-controls/address",
],
"extends": "./tsconfig.json",
"include": [
    "tmp/components/**/*",
]

一切都正确,

address
组件未包含且未编译。

但是当我将其替换为(仅指定要排除的1个子目录)时

    "tmp/components/form-controls/address/address-city"

address-city
已包含在内。为什么会这样?

javascript typescript tsconfig tsc
1个回答
0
投票

也许你必须使用:

"tmp/components/form-controls/address/*"
或者
"tmp/components/form-controls/address/address-city/*"

© www.soinside.com 2019 - 2024. All rights reserved.