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

@layer rules that do not have a block and do not have a trailing semi-colon break sourcemaps #1802

Closed
romainmenke opened this issue Dec 4, 2022 · 5 comments

Comments

@romainmenke
Copy link
Contributor

@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 : #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.

@ai
Copy link
Member

ai commented Dec 4, 2022

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.

@romainmenke
Copy link
Contributor Author

romainmenke commented Dec 4, 2022

This is not blocking for us, take your time :)

@ai
Copy link
Member

ai commented Dec 11, 2022

Fixed 20122e5

@ai ai closed this as completed Dec 11, 2022
@romainmenke
Copy link
Contributor Author

Thank you @ai 🙇

@ai
Copy link
Member

ai commented Dec 11, 2022

The fix was released at 8.4.20.

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