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

Option for disabling generation of sourcemaps #609

Closed
mian3010 opened this issue Jun 7, 2017 · 3 comments
Closed

Option for disabling generation of sourcemaps #609

mian3010 opened this issue Jun 7, 2017 · 3 comments

Comments

@mian3010
Copy link

mian3010 commented Jun 7, 2017

There is currently a bug in libsass: sass/libsass#2312

This means that sourcemap generation fails for scss-files that contain an & in selector, such as &.mod-enabled or &:after

Until that bug is fixed it would be great to have the option of disabling sourcemap generation through options to gulp-sass, instead of it assuming you want them generated whenever the sourcemap plugin is present:

    if (file.sourceMap) {
      opts.sourceMap = file.path;
      opts.omitSourceMapUrl = true;
      opts.sourceMapContents = true;
    }

Am i reading the code correctly? I am still a gulp/nodejs novice.

Even after the bug in libsass is fixed, it would be nice to have the option to disable sourcemap generation through options.

My suggestion is this: reload@1724bee

Then setting sourceMap: false in gulpfile.js will disable sourcemap generation.

Additional information:

# node --version
v6.7.0
# npm --version
5.0.3
# cat package.json
...
    "gulp-sass": "^3.1.0",
...

OS: Alpine Linux

@xzyfer
Copy link
Collaborator

xzyfer commented Aug 31, 2017

You should be able to set the sourceMap config directly.

@xzyfer xzyfer closed this as completed Aug 31, 2017
@mian3010
Copy link
Author

mian3010 commented Sep 3, 2017

Yes, however, that makes no difference, when i set it. Also, looking at the condition, i do not believe that it is even used, that option.

The documentation clearly states that the default value is undefined, and that sourcemaps will be generated when the value is === true, or the type of the value is string, so if i do not set that option at all, sourcemaps should not be generated. They are anyway, and failing.

@mian3010
Copy link
Author

mian3010 commented Sep 3, 2017

Why can't i reopen this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants