Skip to content

rooDir does not seems to work with JS files #2974

Closed
@NekR

Description

@NekR

I have following structure

└───src
    ├───external
    │   └───lib
    └───App
        ├───Class

src/external/lib/ contains 2 files, lib.js and lib.d.ts.
In src/App/Class/Class.ts I am importing ../../external/lib/lib and it works fine, but generates following structure:

└───dist
    └───App
        ├───Class

With JS files in dist/App/Class. My config is:

{
  "compilerOptions": {
    "module": "commonjs",
    "sourceMap": false,
    "target": "ES5",
    "noImplicitAny": true,
    "outDir": "./dist",
    "rootDir": "./src"
  },
  "files": [
    "src/main.ts"
  ]
}

So I thought what rootDir property should solve this problem and transfer entire structure to dist folder. Am I doing something wrong?

Metadata

Metadata

Assignees

No one assigned

    Labels

    QuestionAn issue which isn't directly actionable in code

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions