outDir is not taking into account
See original GitHub issueHi
likely my mistake, but I did not get it to work.
I have the following configuration (just keep relevant fields)
{
"include": [
"../../eikon-framework/src/**/*.ts"
],
"compilerOptions": {
"baseUrl": ".",
"paths": {
"df-core/*": ["./build/df-core/*"],
"*": [
"./node_modules/*",
"./node_modules/@types/*"
]
},
"rootDir": "../../eikon-framework/src",
"outDir": "./build/eikon-framework"
}
}
I have the following file:
…/…/src/eikon-framework/src/auth/auth-impl.ts
import { GetElectronEnvironment } from 'df-core/env';
after the compilation in the outDir folder I have
[outDir]/eikon-framework/auth/auth-impl.js
const env_1 = require("../../../products/workspace/build/df-core/env/index");
It seems the resolution has been done from the original location of TS file and not from the output location of JS file. With “df-core/“: [”./build/df-core/”] and outDir = ./build/eikon-framework/auth/auth-impl.js
I would expect
const env_1 = require("../../df-core/env/index");
Could you help me please
Thanks
Issue Analytics
- State:
- Created 2 years ago
- Comments:11 (3 by maintainers)
Top Results From Across the Web
typescript outDir setting in tsconfig.json not working
When running the tsc command on the index file, it creates a new one beside it instead of in the build directory. What...
Read more >tsc says "No inputs were found" when "outDir": "." · Issue #41734
I get an error message about "No inputs were found" if I have the below in my tsconfig.json . This is extremely confusing...
Read more >Documentation - tsc CLI Options - TypeScript
Flag Type Default
‑‑allowJs boolean false
‑‑allowUmdGlobalAccess boolean false
‑‑allowUnreachableCode boolean
Read more >$(OutDir) Does not match Output Directory ? - Microsoft Q&A
Hi, and thanks for your help! To my confusion when I looked into the macros tody the $(OutDir) was correct - it was...
Read more >Typescript and tsconfig; outDir and rootDir is not respected in ...
Debugging of TypeScript and discovering of Mocha tests should work with outDir + rootDir in tsconfig. Actual Behavior. Throws an error complaining that ......
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

@couellet I think you need 2 entries in the plugin section for the transformer to actually work:
https://github.com/LeDDGroup/typescript-transform-paths#example-config
Looking at your code and debugging the plugin, I found a way to deal with rootDirs.
I’m wondering if we could have another way just using ‘paths’, ‘rootDir’ and ‘outDir’ to achieve the same. I have the feeling to duplicate the information.
Feel free to close this issue and thanks for your help and for this plugin.