-
Notifications
You must be signed in to change notification settings - Fork 240
Open
Description
Using vite 8 beta with lightningcss set as the transformer, but this doesn't seem specific to vite.
I have a very simple plugin that uses the StyleSheetExit visitor to make some rule modifications. I reduced the plugin so that it simply returns the passed in sheet variable. I get an error due to the type: 'ignored' rules.
// My Plugin:
{
StyleSheetExit(sheet) {
console.log(sheet)
return sheet
}
}
// Outputs:
{
rules: [
{ type: 'layer-statement', value: [Object] },
{ type: 'font-face', value: [Object] },
{ type: 'font-face', value: [Object] },
{ type: 'font-face', value: [Object] },
{ type: 'font-face', value: [Object] },
{ type: 'font-feature-values', value: [Object] },
{ type: 'ignored' },
{ type: 'ignored' }
],
sources: [
'/path/to/project/apps/website/src/css/index.css',
'/path/to/project/packages/ui-kit/style.css'
],
sourceMapUrls: [ null, null ],
licenseComments: []
}It looks like it comes from here since there is no value property. Either removing the ignored rules from the array or setting the value property to an empty string prevents the issue.
Line 232 in eb49015
| let content = value.ok_or_else(|| serde::de::Error::missing_field("value"))?; |
Metadata
Metadata
Assignees
Labels
No labels