Replies: 12 comments
|
@ulysset can you provide us the console output when running with -r debugger.js? Working version and nonworking version? const util = require('util');
let loggedConfig = true;
exports.default = ({ orig, file, config }) => {
if (loggedConfig) {
console.log(util.inspect(config, {showHidden: false, depth: null, colors: true}));
loggedConfig = false;
}
console.log(orig);
console.log(file);
return orig;
}; |
|
Thank you @raouldeheer for the quick answer :) Working versionNon-working |
|
@ulysset can you try: tsc-alias -r debugger.js > working.txtTo get the full output in a file. It seems the log is too big for console. |
|
Yes indeed, here you go: |
|
same problem for me |
|
@ulysset @Ge-yuan-jun I haven't been able to reproduce this bug. Could you setup a demo repo with the reproducible bug? |
|
@raouldeheer sorry, I'm having trouble reproducing it although I still have the bug :( |
|
This just hit me in the face in production. For some reason it ignored the alias mappings to a top level folder called |
|
Don't know if it's related, but this bug is happening to me when the calculated |
|
@fsmaia thanks for the suggestion. My |
This fixes our issue! {
"extends": "@x/tsconfig/node.json",
"include": ["**/*.ts"],
"compilerOptions": {
"outDir": "./dist/",
"rootDir": "../../",
"baseUrl": "../../",
"paths": {
"src/*": ["./apps/jobs/src/*"],
"@x/node-utils": ["./packages/node-utils/src/index.ts"],
"@x/node-utils/*": ["./packages/node-utils/src/*"]
}
},
"exclude": ["node_modules"]
}Basically baseUrl and rootDir is the same but we reference the paths from the root and it's working fine :) |
Uh oh!
There was an error while loading. Please reload this page.
Hi, thank you so much for this amazing lib :)
Everything works fine when using 1.6.4 I get
tsc-alias info: 94 files were affected!But when I switch to 1.6.5 I get
tsc-alias info: 0 files were affected!(I don't get any errors)It seems like this commit broke my config 0abf049
My tsconfig is
{ "extends": "../../tsconfig.packages.json", "compilerOptions": { "rootDir": "./src", "outDir": "./dist", "baseUrl": "../..", "paths": { "@utils/*": [ "packages/server/src/utils/*" ], "@generated/*": [ "packages/server/src/generated/*" ], "@resolvers/*": [ "packages/server/src/resolvers/*" ], "@gqlTypes/*": [ "packages/server/src/types/*" ], "@context": [ "packages/server/src/context.ts" ], "@c4f-platform/*": [ "packages/*/" ] }, "allowJs": false, "target": "ES6", "moduleResolution": "node", "allowSyntheticDefaultImports": true, "module": "commonjs", "sourceMap": true, "listEmittedFiles": false, "alwaysStrict": true, "esModuleInterop": true, "resolveJsonModule": true, "skipLibCheck": true, "strictNullChecks": true, "lib": [ "esnext" ], "composite": true, "declaration": true, "declarationMap": true }, "include": [ "lib/**/*", "bin/*", "tests/*.test.*", "src/**/*", "src/**/*.json" ], "exclude": [ "node_modules" ], "references": [] }I don't understand why the changes broke the compilation based on my config.
Let me know if you need more info on my config :)
Have a nice day
All reactions