Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Accept File URLs in a VLQ Map #116

Open
binyamin opened this issue Nov 14, 2022 · 0 comments
Open

Accept File URLs in a VLQ Map #116

binyamin opened this issue Nov 14, 2022 · 0 comments

Comments

@binyamin
Copy link

binyamin commented Nov 14, 2022

Summary

When a VLQ Map's contains a File URL in the map's sources array, this module should preserve the "file://" URL scheme. Currently, it will strip the scheme and the leading slash, making it impossible for browsers to resolve correctly.

Relevance: By default, dart-sass generates file URLs. Which makes sense, because it's referring to files on the disk, not hosted files. This module mutilates the URL. Which means it will generate two sources for one file.

Before

{
    version: 3,
    sources: [
        "file:///home/binyamin/fake/style.scss"
    ],
    // ... rest of source-map
}

After

{
    version: 3,
    sources: [
        "home/binyamin/fake/style.scss"
    ],
    // ... rest of source-map
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant