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 doesn't work on Mozilla Firefox #159
Comments
Hm... interesting info. Didn't knew that it was reason of FF fail. |
@puzrin I've found the solution: We just need to add a single quote So it looks like this:
I can create a pull request if you want, just let me know. Have a good day, |
Please, check if version from master is ok. If your problem is solved, i'll publish it. |
@puzrin 👍 It's fixed in both server mode and manifest compiler. |
I can also confirm that JavaScript Source Mapping works with Internet Explorer 11 (IE11). Here some useful docs: http://msdn.microsoft.com/en-US/library/ie/dn255007%28v=vs.85%29#source_maps |
Thanks |
Is there anything special that needs to be done to make this work? I have the
but on the Firefox console the line numbers are the ones from main.css only (the manifest) and even the style definitions point to |
You're right CSS source mapping looks broken with Firefox |
With every Web browsers (Chrome included) CSS source mapping is buggy when assets are compressed. |
May be css needs inline comment instead of block one? Or needs to have XSSI header removed?
We don't use sourcemaps at all, and i didn't digged this area too much. |
As I know, inline comments aren't supported in CSS, but you can do it in Less. So mincer need a fix to support CSS source mapping in production mode (when CSS files are concatenated via a manifest file) with Firefox. You can fix it manually: remove all E.G. The /*# sourceMappingURL=application.css.map */
/*CSS rules...*/
/*# sourceMappingURL=bootstrap.less.map */
/*CSS rules...*/
/*# sourceMappingURL=application-dc2eda33eab77f6f0a11217e03088820.css.map */ Become: /*CSS rules...*/
/*# sourceMappingURL=application-dc2eda33eab77f6f0a11217e03088820.css.map */ Now Firefox is able to get every CSS/LESS/Sass files of your CSS manifest. |
Do i understand rigth, that mincer forgets to clear sourcemap comments in js & css prior to concatenate assets? |
I don't know if mincer (or its dependencies) keep them intentionally or not. Sorry for my bad English, I'm French. |
Created new issue #168 Could you investigate? I see 2 potentioal problems:
|
You means
I guess. |
Yes. I don't have full browser set to dig deep. If you have some time - try to change comments for generated files, and let me know if this improve something. Code to change is here https://github.com/nodeca/mincer/blob/master/lib/mincer/assets/bundled.js#L204 |
If we remove the XSSI protection here:
https://github.com/nodeca/mincer/blob/1.1.1/lib/mincer/server.js#L301
And here:
https://github.com/nodeca/mincer/blob/1.1.1/lib/mincer/manifest.js#L264
Source Map is OK with the red panda.
Maybe someone know an other XSSI protection which is compatible with Chrome and Firefox ?
The text was updated successfully, but these errors were encountered: