Skip to content
This repository was archived by the owner on Nov 4, 2023. It is now read-only.
This repository was archived by the owner on Nov 4, 2023. It is now read-only.

Incorrect path resolving on Windows with multiple disks #9

@itoys

Description

@itoys

Hello!
When executable code and sources located on separate disk(i.e C:/ and D:/) method
require('source-map-resolve").resolveSync works incorrect.
It strips off disk letter(urix package) and after when it trying read from disk, it catch error.
For example:
server running on disk C:, sources located on disk D:

let filePath = 'D:\\projects\\test\\index.js';
sourceMapResolve.resolveSync(someCode, filePath, fs.readFileSync);

I have error:
ENOENT: no such file or directory, open 'C:\projects\test\build\index.js.map'
Because map file located on disk D:

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions