Closed DiegoVictor closed 1 year ago
@jonkwheeler please merge this pr. Everything works fine on mac os , but on windows it doesn’t work at all. Thank you!
@jonkwheeler please merge this pr. Everything works fine on mac os , but on windows it doesn’t work at all. Thank you!
@Autofan1992 I created a fork (actually a new library) with the fix and other stuff: https://github.com/DiegoVictor/tsc-path-replacer
Happy you found a work around. I just haven't had time to test this.
I just tested this and it failed on one of my repos. It said it replaced 0 paths... ?
$ tsc --project tsconfig.types.cjs.json && tsconfig-replace-paths --project tsconfig.types.cjs.json
Replaced 0 paths in 0 files
$ tsc --project tsconfig.types.esm.json && tsconfig-replace-paths --project tsconfig.types.esm.json
Replaced 0 paths in 0 files
I'll happily reopen if a different fix is presented.
The
globby
library doesn't accept backward-slashes onsync
function:Ref: https://github.com/sindresorhus/globby#api
This is the reason to the path replacement doesn't work properly on some Windows consoles/terminals. Windows uses backward slashes:
This PR makes sure to always pass a pattern with forward-slashes: