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/[email protected]/",
"react": "https://esm.sh/[email protected]/compat",
"react/": "https://esm.sh/[email protected]/compat/",
"preact": "https://esm.sh/[email protected]",
"preact/": "https://esm.sh/[email protected]/",
"preact-render-to-string": "https://esm.sh/*[email protected]",
"@preact/signals": "https://esm.sh/*@preact/[email protected]",
"@preact/signals-core": "https://esm.sh/*@preact/[email protected]",
"@emotion/react": "https://esm.sh/*@emotion/[email protected]",
"@emotion/react/": "https://esm.sh/*@emotion/[email protected]/",
"@emotion/cache": "https://esm.sh/@emotion/[email protected]",
"@emotion/serialize": "https://esm.sh/@emotion/[email protected]",
"@emotion/use-insertion-effect-with-fallbacks": "https://esm.sh/@emotion/[email protected]",
"@emotion/utils": "https://esm.sh/@emotion/[email protected]",
"@emotion/weak-memoize": "https://esm.sh/@emotion/[email protected]",
"hoist-non-react-statics": "https://esm.sh/*[email protected]",
"react-is": "https://esm.sh/*[email protected]",
"@babel/runtime/": "https://esm.sh/@babel/[email protected]/"
}
} 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/[email protected]/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