You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Right now, based on codebase, library supports only posix relative paths.
Reproduction
This is correct relative path in context of this library:
../../../src
This is incorrect relative path in context of this library:
..\\..\\..\\src
To understand how the library understands these paths, you can call getType from this file:
posix path as Relative; win32 path - as Normal
So, anything that can be passed as a result by path.relative(...) in Node.js, will not work as expected on Windows machines.
Solutions
Possible solution is to add separation in the enum of types for RelativePosix and RelativeWin, like for the Absolute.. paths. But it's hard to predict what integrations with this library are going to break, so I think it can be a big deal.
Workaround
Add replacing for backward compatibility with Windows (Windows can handle posix separator):
PS. Maybe you want to handle only relative posix paths in this library, and then I think it would be cool to add information about this scenario or to close this issue with a preferable workaround.
The text was updated successfully, but these errors were encountered:
It's possible to get this type of paths when you work with module-federation f.e. Of course, it's overhead to give an example with another library, but I can provide an example with current library via codesandbox.
Issue
Right now, based on codebase, library supports only posix relative paths.
Reproduction
This is correct relative path in context of this library:
This is incorrect relative path in context of this library:
To understand how the library understands these paths, you can call
getType
from this file:posix path as
Relative
; win32 path - asNormal
So, anything that can be passed as a result by path.relative(...) in Node.js, will not work as expected on Windows machines.
Solutions
Possible solution is to add separation in the enum of types for
RelativePosix
andRelativeWin
, like for theAbsolute..
paths. But it's hard to predict what integrations with this library are going to break, so I think it can be a big deal.Workaround
Add replacing for backward compatibility with Windows (Windows can handle posix separator):
PS. Maybe you want to handle only relative posix paths in this library, and then I think it would be cool to add information about this scenario or to close this issue with a preferable workaround.
The text was updated successfully, but these errors were encountered: