Using @emotion/react #826
Unanswered
TranquilMarmot
asked this question in
Q&A
Replies: 1 comment 1 reply
-
Alright, giving this another shot I got it working even with server-side rendering! Kind of a mess, though 😅 Here's my {
"imports": {
"$fresh/": "https://deno.land/x/fresh@1.1.1/",
"react": "https://esm.sh/preact@10.11.0/compat",
"react/": "https://esm.sh/preact@10.11.0/compat/",
"preact": "https://esm.sh/preact@10.11.0",
"preact/": "https://esm.sh/preact@10.11.0/",
"preact-render-to-string": "https://esm.sh/*preact-render-to-string@5.2.4",
"@preact/signals": "https://esm.sh/*@preact/signals@1.0.3",
"@preact/signals-core": "https://esm.sh/*@preact/signals-core@1.0.1",
"@emotion/react": "https://esm.sh/*@emotion/react@11.10.4",
"@emotion/react/": "https://esm.sh/*@emotion/react@11.10.4/",
"@emotion/cache": "https://esm.sh/@emotion/cache@11.10.3",
"@emotion/serialize": "https://esm.sh/@emotion/serialize@1.1.0",
"@emotion/use-insertion-effect-with-fallbacks": "https://esm.sh/@emotion/use-insertion-effect-with-fallbacks@1.0.0",
"@emotion/utils": "https://esm.sh/@emotion/utils@1.2.0",
"@emotion/weak-memoize": "https://esm.sh/@emotion/weak-memoize@0.3.0",
"hoist-non-react-statics": "https://esm.sh/*hoist-non-react-statics@3.3.2",
"react-is": "https://esm.sh/*react-is@18.2.0",
"@babel/runtime/": "https://esm.sh/@babel/runtime@7.19.4/"
}
} The Then, in The only thing that's still broken is JSX typescript types now... since |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I want to try using
@emotion/react
with Fresh but I'm not sure that it's entirely possible.I tried adding this in my
import_map.json
:Then, in
deno.json
, I set this undercompilerOptions
:This results in the following error:
Which is kind of a weird error since https://esm.sh/@emotion/react@11.10.4/jsx-runtime definitely exists. Maybe I'm mis-understanding how the imports/esm works?
Some other notes:
preact-compat
; see this discussion for some detailsBeta Was this translation helpful? Give feedback.
All reactions