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

Edge routes with emotion #48

Closed
ilijaNL opened this issue Aug 26, 2023 · 1 comment
Closed

Edge routes with emotion #48

ilijaNL opened this issue Aug 26, 2023 · 1 comment

Comments

@ilijaNL
Copy link

ilijaNL commented Aug 26, 2023

Hello,

I am trying to get emotion (mantine ui) working inside a route which is using edge runtime, however since emotion ssr is using some native nodejs modules (stream/buffer) I am kinda stuck. According to this gh comment remix-run#2813 (comment), remix does polyfills when targeting non nodejs environments and I wonder if this is still true? Currently when I am trying to deploy vercel I get the following error:

Error: The Edge Function "layout/:id" is referencing unsupported modules:
        - duplexer2: ./internal/streams/stream, stream
        - html-dom-parser: ./index.js
        - multipipe: stream
        - readable-stream: stream
        - through: stream

In the end I just want to get emotion SSR working on an edge runtime. What is the best solution to do this?

@TooTallNate
Copy link
Member

If Emotion is using Node.js-specific APIs then it won't work on Edge runtime. You would need to ask them to enable support for that. Looks like there is a relevant conversation here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants