`@layer` rules that do not have a block and do not have a trailing semi-colon break sourcemaps
See original GitHub issue@layer extensions {
@layer one, two
}
This is equivalent to:
@layer extensions.one, extensions.two;
It parses correctly but fails to write a sourcemap :
Invalid mapping: {"generated":{"line":3,"column":-1},"source":"a.css","original":{"line":2,"column":16},"name":null}
The error goes away when I add a trailing semi-colon :
@layer extensions {
@layer one, two;
}
I don’t have any knowledge about sourcemap internals and failed to pinpoint where it is going wrong.
I did add some tests to reproduce this : https://github.com/postcss/postcss/pull/1801
I don’t think the parsing the test is needed but I wanted to see how it was parsed. Maybe I am overlooking something there.
Issue Analytics
- State:
- Created 10 months ago
- Comments:5 (5 by maintainers)
Top Results From Across the Web
Are Webpack SASS Source-maps Broken? - Stack Overflow
EDIT: I'm usinge devtool: 'source-map' in production and devtool: 'cheap-eval-source-map' in development. I don't fully understand the forces at ...
Read more >stylelint/CHANGELOG.md at main - GitHub
A mighty, modern linter that helps you avoid errors and enforce conventions in your styles. - stylelint/CHANGELOG.md at main · stylelint/stylelint.
Read more >4 Reasons Why Your Source Maps are Broken - Sentry Blog
This likely means that your source map doesn't contain or link to your original source files. Without your original source files, you're still ......
Read more >Safari Technology Preview Release Notes - Apple Developer
Updates to Safari Technology Preview are no longer available for macOS Big Sur. If you already have Safari Technology Preview installed, you can...
Read more >SourceMapDevToolPlugin - webpack
This plugin enables more fine grained control of source map generation. ... the output filename of the SourceMap (will be inlined if no...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
The fix was released at 8.4.20.
Thanks for the issue with a lot of details.
I will fix it. But very likely that I will do it after my vacation week later.