13 lines
398 B
TypeScript
13 lines
398 B
TypeScript
import createCache from "@emotion/cache";
|
|
|
|
export const defaultCache = createEmotionCache();
|
|
|
|
export default function createEmotionCache() {
|
|
// The browser throws when calling .default, but the server throws if we don't call .default
|
|
// Of course!
|
|
return typeof document === "undefined"
|
|
? createCache.default({ key: "cha" })
|
|
: // @ts-expect-error
|
|
createCache({ key: "cha" });
|
|
}
|