-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
[css-minifier] Support layer
and supports
in @import
#2437
Comments
Your issue description doesn't have any words, so I'm not sure why you posted this. It seems like you're implying that whitespace is required before and after the import path. However, I just tested this and all browsers treat these two as exactly the same thing, so what esbuild is doing appears to be correct: @import 'foo.css' layer(default);
@import'foo.css'layer(default); Please write a description for your issue. Describe what about esbuild's output is unexpected, and what is expected instead. In this case a link to a relevant specification and/or a real test case that demonstrates a browser rendering difference before/after running esbuild would be helpful. |
Marking as |
Sorry, I meant that I need to keep the spaces, but I need to test further which browsers don't support removing spaces. I'll close this issue first. |
Not sure if it's a good idea to reuse this issue: I got @import "./base.css" layer(base); is there a workaround to make esbuild builds css files? I have this base imported in multiple files that use According to the OP's output makes me think esbuild supports (bundling) this, does it? |
you can't use the bundle option with this import syntax |
Input
Output
Expected
More test case: https://github.com/swc-project/swc/blob/331f91a37f3a0f59d9b66cc87bd20da360ff0749/crates/swc_css_parser/tests/fixture/at-rule/import/input.css#L1-L163
The text was updated successfully, but these errors were encountered: