Hi all,
We are migrating to Hilla 1.2.7 and trying to our project to work with Vite, but are seeing an error in the browser (Attached screenshot):
[mobx] Encountered an uncaught exception that was thrown by a reaction or observer component, in: ‘Reaction[When@18]’ TypeError: Failed to set the ‘adoptedStyleSheets’ property on ‘ShadowRoot’: Failed to convert value to ‘CSSStyleSheet’.
The error seems to come from the components that use scss.
In order for scss to work, we have added a types.d.ts file and included in our tsconfig file:
declare module ‘*.scss’ {
import { CSSResult} from ‘lit’;
const styles: CSSResult;
export default styles;
}
I saw this issue with Vite and CSS and wonder if it is related?:
https://github.com/vaadin/flow/issues/14142