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

[Bug] Source maps are broken when used with SrcOptions#base option #574

Open
chalkygames123 opened this issue Feb 11, 2023 · 1 comment
Open
Assignees
Labels
bug Something isn't working help wanted Extra attention is needed

Comments

@chalkygames123
Copy link
Contributor

This plugin breaks source maps when used with the base option of gulp.src(), and Chrome DevTools, for example, shows an error in the Sources panel like this:

Could not load content for http://localhost:8080/dist/styles/_partial.scss (HTTP error: status code 404, net::ERR_HTTP_RESPONSE_CODE_FAILURE)

Also, even without the base option, when using gulp's built-in source maps support, only the source maps for partials will be broken, and the source maps for stylesheets in node_modules will work.

Quick summary:

Using the base option? Source Maps provider Are the source maps for partials valid? Are the source maps for node_modules valid?
No Plugin Yes Yes
Yes Plugin No No
No Built-in No Yes
Yes Built-in No No

Minimal reproduction: https://github.com/chalkygames123/repro-mr-hope__gulp-sass-source-maps

As a workaround, enabling sourceMapIncludeSources option of the Sass compiler fixes this issue.

@chalkygames123 chalkygames123 added the bug Something isn't working label Feb 11, 2023
@Mister-Hope Mister-Hope added the help wanted Extra attention is needed label Feb 11, 2023
@Mister-Hope
Copy link
Owner

I appreciate the detailed information, I am not having much time to check this these days, so I would appreciate it if you could open a pr to fix it.

The problem is that the code is written too old for me and I do not have much memory for gulp-sourcemap or related source map conversion codes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants