-
Notifications
You must be signed in to change notification settings - Fork 25
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
Installing causes ember-cli-sass source maps to stop working #18
Comments
I haven't quite gotten it to work either, but I do believe that a solution involves inline source maps, as we just process the actual css-file because of the way the streams are passed around in broccoli. I know that these packages both handle source maps separately, but if you find a way to make them work together, I'd love to hear about it. I don't have the capacity to investigate at the moment unfortunately, but I'd obviously love it if it worked. |
@Grantovich @kimroen has any progress been made on this issue? Would love to know if a solution was found or if this is still a problem. |
No, I haven't done anything with this yet, but here are some observations after looking through some of the code:
Based on this, it looks like the current state is that the sourcemap options you can pass in is handled by postcss, and if nothing is passed in, Here's the documentation for sourcemaps with postcss: https://github.com/postcss/postcss#source-map Based on this documentation, postcss should figure out the sourcemaps based on the inline comments of the previous source map:
In theory, this should be all the info we need to figure it out, but there is some additional history with ember-cli-sass and sourcemaps: ember-cli-sass is using its own fork of broccoli-sass to get around this problem: https://github.com/aexmachina/broccoli-sass-source-maps Comparing the two, it looks like
There's some manual file handling going on in Some options related to source maps are to be found in node-sass: https://github.com/sass/node-sass#sourcemap So, after looking at all this, the current status is that there might be a combination of options that works right now, or it could be that the file stuff I mentioned above makes it so that the projects are incompatible at the moment, source-map wise. Like I said, I'd love if this worked, but I haven't had the bandwidth to look in to it further than this yet. Any help is appreciated! |
For those still wondering how to get this working, here's the fix: in sassOptions: {
sourceMapEmbed: true,
},
autoprefixer: {
sourcemap: true,
}, This will inline the sourcemaps so they work in dev. |
I'm not sure whether this is the right package to report this on, but it at least appears distinct from #9 since that issue refers to inline source maps, and the current release of ember-cli-sass generates source maps in separate
.map
files.Basic reproduction steps:
At this point
testapp.css
is correctly generated with asourceMappingURL
comment at the end....and at this point, the comment is no longer present, although the map files themselves are still generated. Setting the broccoli-autoprefixer
sourcemap
option generates a newsourceMappingURL
comment with a data URI – however, this "map" only contains the compiled CSS file after it's been run through broccoli-sass, making it useless.Advice on how to get these packages working nicely together would be appreciated.
The text was updated successfully, but these errors were encountered: