Chakra 2.x / React 18, styles missing
Chakra 2.x doesn't correctly output styles for SSR on v85.
Because, this code is removed during compile: https://github.com/emotion-js/emotion/blob/6f1f408217d84088cb1c63dc9d6bb8670a2ae78c/packages/styled/src/base.js#L34
Possible due to document being defined? I am not sure: https://github.com/emotion-js/emotion/blob/6f1f408217d84088cb1c63dc9d6bb8670a2ae78c/packages/styled/src/base.js#L25
The compiled deno output is here: https://esm.sh/v85/@emotion/[email protected]/deno/styled.js?dev
The compiled node output is here: https://esm.sh/v85/@emotion/[email protected]/node/styled.js?dev
I was able to confirm the issue by using the 'node' output and hand-fixing the few 'process.env.NODE_ENV' checks.
Do you know why 'document' would be defined during the compile/serving of the Deno version of this file??? Or why that block of code would be removed during the compile phase??
(Thanks for creating esm.sh, I hope I can somehow help get Chakra 2.x + React 18.x working on esm.sh)
The original issue with more info is here: https://github.com/emotion-js/emotion/issues/2777