tsconfig-replace-paths
tsconfig-replace-paths copied to clipboard
Pass patterns with forward-slashes
The globby
library doesn't accept backward-slashes on sync
function:
Note that glob patterns can only contain forward-slashes, not backward-slashes, so if you want to construct a glob pattern from path components, you need to use `path.posix.join()` instead of `path.join()`.
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:
D:\git\tsconfig-replace-paths\dist/**/*.{js,jsx,ts,tsx}
This PR makes sure to always pass a pattern with forward-slashes:
D:/git/tsconfig-replace-paths/dist/**/*.{js,jsx,ts,tsx}