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

Source map generation on Windows uses back slash instead of forward slash #487

Closed
adamburgess opened this issue Mar 7, 2015 · 1 comment
Labels
Milestone

Comments

@adamburgess
Copy link

Noticed this while making #484
Source map sources are URLs, so even on Windows they should be using forward slashes.
If a source is folder\file.css, Chrome will display it literally folder\file.css, and not inside it's own folder in the tree, so the way it's currently done using path is wrong.
I think the easiest way to fix this is simply by replacing \ with / on Windows.

@XhmikosR
Copy link
Contributor

XhmikosR commented Mar 7, 2015

IIRC this is an upstream issue with source-map but there's no upstream fix so this will need to be fixed in clean-css itself.

We've had this issue in other modules like grunt-contrib-concat. gruntjs/grunt-contrib-concat#117
Upstream issue: mozilla/source-map#91

@jakubpawlowicz jakubpawlowicz added this to the 3.2 milestone Apr 13, 2015
jakubpawlowicz added a commit that referenced this issue Apr 13, 2015
Apparently there's a bug in `source-map` library which does not
normalize paths in `source` field to proper URL format.

Thus source maps generated on Windows have backslashes instead of
forward slashes. We correct it manually to get same output on all
platforms.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants