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

test dir and file can not exclude after builded #4

Open
lichnow opened this issue Apr 16, 2020 · 0 comments
Open

test dir and file can not exclude after builded #4

lichnow opened this issue Apr 16, 2020 · 0 comments

Comments

@lichnow
Copy link

lichnow commented Apr 16, 2020

How to include test files in tsconfig.json and exclude that in tsconfig.build.json for api?

// tsconfig.json
{
    "extends": "../../tsconfig.json",
    "compilerOptions": {
        "rootDir": "./src",
        "outDir": "./dist"
    },
    "include": ["src","src/**/*", "typings/**/*"],
    "exclude": ["node_modules", "test", "dist", "**/*spec.ts"],
    "references": [
        { "path": "../../packages/core" }
    ]
}

and

// tsconfig.build.json

{
    "extends": "./tsconfig.json",
    "compilerOptions": {
        "rootDir": "./src",
        "outDir": "./dist"
    },
    "include": ["src/**/*", "typings/**/*"],
    "exclude": ["node_modules", "test", "dist", "**/*spec.ts"],
    "references": [
        { "path": "../../packages/core" }
    ]
}

exec lerna run build --scope @xxx/cli which depend on api, as ts references can not sepcify the tsconfig,it will auto load packages/api/tsconfig.json to compile the api,so can not exclude test files

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant