question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[CSS] Need new CSS processor: Sourcemaps for imported files are not correct

See original GitHub issue

Similar to #271, except the source maps are generated, but not pointing at the relevant resulting file.

I have scss/_colors.scss, which is @imported by scss/style.scss.

scss/style.scss is compiled to build css/style.css.

However the mapping for scss/_colors.scss points to a non-existent, unused file called css/_colors.css

See the image below.

image

I’m not 100% sure what the source map for an @imported file should be, but the current mapping to a non-existent file doesn’t seem correct.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:7 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
nmccreadycommented, May 2, 2018

From what I remember the problem boils down to bug in the parser css library. See: #351 as we are considering alternative libraries.

0reactions
phatedcommented, May 6, 2019

If you need this change, you can install @gulp-sourcemaps/identity-map and use it within your pipeline. I just released v2.0.0 which swaps the css library with postcss to generate CSS sourcemaps. We won’t be able to bump it in gulp-sourcemaps because it required a bunch of breaking changes.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Why doesn't chrome understand my scss source map?
Chrome DevTools fails to understand the mapping correctly. It is clearly trying; but all mappings point to reset.scss in various locations rather than...
Read more >
Should I Use Source Maps in Production? | CSS-Tricks
Typically, source maps are a configuration option from the preprocessor. Here's Babel's options.
Read more >
Webpack with CSS Modules - E.Y.
How is this working? We need to import the stylesheet to the JS file, and write our classname like styles[“classname”] : //JS
Read more >
Working with CSS in Nuxt.js - Red Onion
A short article series about working with and adding CSS to Nuxt.js projects. Main topics in this article are preprocessors, autoprefixing, ...
Read more >
rollup-plugin-scss - npm
Rollup multiple .scss, .sass and .css imports. Latest version: 4.0.0, last published: a month ago. Start using rollup-plugin-scss in your ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found