windicss / vite-plugin-windicss

🍃 Windi CSS for Vite ⚡️
MIT License
852 stars 65 forks source link

devtools: MutationObserver is not defined in SSR #247

Closed mrwokkel closed 2 years ago

mrwokkel commented 2 years ago

Describe the bug When using the windi devtools and starting op a dev server, I get the error:

[vite] Error when evaluating SSR module /@windicss/devtools: ReferenceError: MutationObserver is not defined

Minimal Reproductions https://github.com/mrwokkel/mutationobserver

Versions

Additonal Context When loading virtual:windi-devtools in browser only, it works. But seems that should check on existence of MutationObserver before even starting.

antfu commented 2 years ago

What's the browser you are using?

mrwokkel commented 2 years ago

Chrome Version 94.0.4606.81 (Official Build) (x86_64).

mrwokkel commented 2 years ago

Problem is the Server Side Rendering part...