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
Wrong sourceMappingURL #201
Comments
I can reproduce this, but it doesn't seem to be related to our code (we're just a simple wrapper). I'll make a minimal reproduction and post it into that issue -- I imagine we're missing some option to the C api (excuse my mix of c and c++ and lack of freeing, just trying to get a quick reproduction) #include <sass/context.h>
#include <iostream>
int main() {
struct Sass_Context *ctx;
struct Sass_File_Context *context = sass_make_file_context(
"input/foo.scss"
);
struct Sass_Options* options = sass_file_context_get_options(context);
sass_option_set_source_map_file(options, "output/css/out.map");
sass_compile_file_context(context);
ctx = sass_file_context_get_context(context);
const char* output_string = sass_context_get_output_string(ctx);
std::cout << output_string << std::endl;
return 0;
}
|
Ah, if I add this: sass_option_set_output_path(options, "output/css/out.css"); it suddenly works! I'll make a PR in a bit to thread this through! |
Thanks for the efficiency! I can't wait for |
Alright, I'll see when I can get this into a release -- I've already started tracking the upstream |
Which ever best for your release process, I'm OK using workaround for now:
I'll just come back to this in few weeks or a couple of months time, pretty sure I'll get this fix eventually. Thanks. |
This is now part of 0.13.0 \o/ |
Thanks, it works now. |
sourceMappingURL
is wrongly relative to scss file, should be relative to css file instead.If browser tries to access
../target/css/style.css.map
fromtarget/css/style.css
, it would get 404 ontarget/target/css/style.css.map
.Doesn't seem like C libsass's issue.
The text was updated successfully, but these errors were encountered: