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

fix(tsconfig): path mapping (module alias) #135

Open
jjangga0214 opened this issue Aug 15, 2021 · 0 comments · May be fixed by #138
Open

fix(tsconfig): path mapping (module alias) #135

jjangga0214 opened this issue Aug 15, 2021 · 0 comments · May be fixed by #138

Comments

@jjangga0214
Copy link
Contributor

jjangga0214 commented Aug 15, 2021

Hi!

I think tsconfig's path mapping does not work.

Reproduction

  1. Clone https://github.com/jjangga0214/ts-yarn-lerna-boilerplate.
  2. After the clone, do not get into the project, but create a new project, called node-dependency-tree-test.
  3. In node-dependency-tree-test, write the code below.
dependencyTree.toList({
    directory: '/path/to/ts-yarn-lerna-boilerplate',
    filename: '/path/to/ts-yarn-lerna-boilerplate/packages/bar/src/index.ts',
    tsConfig: '/path/to/ts-yarn-lerna-boilerplate/tsconfig.json',
  })
  1. Execute it.
  2. It shows
[
  '/path/to/ts-yarn-lerna-boilerplate/packages/bar/src/index.ts'
]

,which actually should be

[
  '/path/to/ts-yarn-lerna-boilerplate/packages/foo/src/hello.ts',
  '/path/to/ts-yarn-lerna-boilerplate/packages/foo/src/index.ts'
  '/path/to/ts-yarn-lerna-boilerplate/packages/bar/src/index.ts'
]

Thanks!

P.S. You might see how tsconfig-paths and tsc-alias work.

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