-
Notifications
You must be signed in to change notification settings - Fork 319
Source map reference fails in Edge/IE 11 #948
Description
Problem
Microsoft Edge doesn't attempt to load the .map file due to the location of the source map comment in the CSS output.
This is somewhat a known phenomenon (with both CSS and JavaScript): https://stackoverflow.com/q/34687049/404623
I also tried opening an issue at less/less-plugin-clean-css#21, but was redirected here.
Environment
- clean-css version -
npm ls clean-css: 3.4.26 - node.js version -
node -v: 0.10.3 - operating system: Windows 10
Configuration options
Not applicable. Default options passed by lessc I assume.
I am using this plugin: https://github.com/less/less-plugin-clean-css
Input CSS
main.less
html{color:red}
body{color:blue}without the less-plugin-clean-css plugin it generates the following CSS, which I assume is the input css:
html {
color: red;
}
body {
color: blue;
}
/*# sourceMappingURL=main.css.map */Actual output CSS
html{color:red}body{color:#00f}/*# sourceMappingURL=main.css.map */Upon loading index.html in Microsoft Edge (which refers to main.css) and opening Debugger in the F12 Developer Tools, there is no request made to the server for the map file, and inspect element shows main.css references in the Styles panel instead of main.less
Expected output CSS
html{color:red}body{color:#00f}
/*# sourceMappingURL=main.css.map */Edge should attempt to load the main.css.map file and refer to the code in the main.less file in the Styles panel in the F12 Developer Tools.
Manually editing the files to add the newline character fixes the problem but defeats the purpose of the build tool.