Skip to content

Commit

Permalink
#180: Support emotion prepend in Next App router
Browse files Browse the repository at this point in the history
  • Loading branch information
garronej committed Sep 18, 2023
1 parent 12df368 commit ce0018b
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/next/pagesDir.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,11 @@ export function createEmotionSsrAdvancedApproach(
nonce={options.nonce}
data-emotion={`${style.key} ${style.ids.join(" ")}`}
key={style.key}
dangerouslySetInnerHTML={{ "__html": style.css }}
dangerouslySetInnerHTML={{
"__html": options.prepend
? `@layer emotion {${style.css}}`
: style.css
}}
/>
))
];
Expand Down

0 comments on commit ce0018b

Please sign in to comment.