@emotion/server throws error on Remix Oxygen runtime.
Error: Dynamic require of "stream" is not supported
at file:///home/guo/git/material-ui/examples/material-ui-remix-ts/dist/worker/index.js?t=1700662329530.0657:11:9
at node_modules/.pnpm/through@2.3.8/node_modules/through/index.js (file:///home/guo/git/material-ui/examples/material-ui-remix-ts/dist/worker/index.js?t=1700662329530.0657:30080:18)
at file:///home/guo/git/material-ui/examples/material-ui-remix-ts/dist/worker/index.js?t=1700662329530.0657:17:50
at node_modules/.pnpm/@emotion+server@11.11.0/node_modules/@emotion/server/create-instance/dist/emotion-server-create-instance.cjs.dev.js (file:///home/guo/git/material-ui/examples/material-ui-remix-ts/dist/worker/index.js?t=1700662329530.0657:32189:19)
at file:///home/guo/git/material-ui/examples/material-ui-remix-ts/dist/worker/index.js?t=1700662329530.0657:17:50
at node_modules/.pnpm/@emotion+server@11.11.0/node_modules/@emotion/server/create-instance/dist/emotion-server-create-instance.cjs.js (file:///home/guo/git/material-ui/examples/material-ui-remix-ts/dist/worker/index.js?t=1700662329530.0657:32293:22)
at file:///home/guo/git/material-ui/examples/material-ui-remix-ts/dist/worker/index.js?t=1700662329530.0657:17:50
at file:///home/guo/git/material-ui/examples/material-ui-remix-ts/dist/worker/index.js?t=1700662329530.0657:36725:57
at ModuleJob.run (node:internal/modules/esm/module_job:217:25)
at ModuleLoader.import (node:internal/modules/esm/loader:316:24)
Current behavior:
@emotion/server throws error on Remix Oxygen runtime.
To reproduce:
https://github.com/guoyunhe/material-ui/tree/remix-oxygen
Expected behavior:
Should work.
Environment information:
react
version: 18.2.0@emotion/react
version: 1.11.1See also https://github.com/mui/material-ui/issues/39929