Content-Length: 258573 | pFad | http://github.com/microsoft/TypeScript/issues/62001

BB `rootDirs` / `outDir` options behaviour change depending on files Β· Issue #62001 Β· microsoft/TypeScript Β· GitHub
Skip to content

rootDirs / outDir options behaviour change depending on filesΒ #62001

@homersimpsons

Description

@homersimpsons

πŸ”Ž Search Terms

"rootDirs", "outDir"

πŸ•— Version & Regression Information

  • This fails with typescript@5.8.3

⏯ Playground Link

No response

πŸ’» Code

// src/index.ts
function foo() { return 'bar'; }
// test/index.ts
function foo() { return 'bar'; }
// tsconfig.json
{"compilerOptions": {"outDir": "./dist", "rootDirs": ["./src", "./test"]}}

πŸ™ Actual behavior

Running tsc with both src/index.ts and test/index.ts outputs 2 files: dist/src/index.js and dist/test/index.js.

BUT running the same command without test/index.ts outputs 1 file: dist/index.js, here the src directory is missing.

πŸ™‚ Expected behavior

running the same command without test/index.ts should output 1 file: dist/src/index.js, (with the srcdirectory).

Additional information about the issue

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions









      ApplySandwichStrip

      pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


      --- a PPN by Garber Painting Akron. With Image Size Reduction included!

      Fetched URL: http://github.com/microsoft/TypeScript/issues/62001

      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy