You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
CSS allows authors to assign a cascade layer to an imported file, like so:
@import'theme.css' layer(core);
This is equivalent to having enclosed the contents of the imported file in a cascade layer.
Expected Behavior: Output the import statement with the layer-name. The only relevant optimization I can think of is minification. Actual Behavior: Esbuild thinks it's a conditional import, and throws an error, because it can't bundle conditional imports.
This isn't trivial to implement because currently importing a file twice doesn't actually bundle it twice (i.e. imports are deduplicated by their file path). I think this would mean that different layers should essentially count as different files. Which should be possible to implement, but I'll have to integrate this information into esbuild's internal file cache key.
CSS allows authors to assign a cascade layer to an imported file, like so:
This is equivalent to having enclosed the contents of the imported file in a cascade layer.
Expected Behavior: Output the import statement with the layer-name. The only relevant optimization I can think of is minification.
Actual Behavior: Esbuild thinks it's a conditional import, and throws an error, because it can't bundle conditional imports.
layer
andsupports
in@import
#2437The text was updated successfully, but these errors were encountered: