Skip to content
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

devtools: MutationObserver is not defined in SSR #247

Closed
mrwokkel opened this issue Oct 17, 2021 · 3 comments · Fixed by #293
Closed

devtools: MutationObserver is not defined in SSR #247

mrwokkel opened this issue Oct 17, 2021 · 3 comments · Fixed by #293
Labels
bug Something isn't working pr welcome

Comments

@mrwokkel
Copy link

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

  • vite-plugin-windicss: ^1.4.11
  • vite: ^2.6.7
  • framework: @sveltejs/kit

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

@mrwokkel mrwokkel added the bug Something isn't working label Oct 17, 2021
@antfu
Copy link
Member

antfu commented Oct 17, 2021

What's the browser you are using?

@mrwokkel
Copy link
Author

Chrome Version 94.0.4606.81 (Official Build) (x86_64).

@mrwokkel
Copy link
Author

Problem is the Server Side Rendering part...

@antfu antfu changed the title devtools: MutationObserver is not defined devtools: MutationObserver is not defined in SSR Oct 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working pr welcome
Projects
None yet
2 participants