tss-react icon indicating copy to clipboard operation
tss-react copied to clipboard

Next.js: Applying augmentDocumentWithEmotionCache to document breaks AMP pages

Open tiotdev opened this issue 1 year ago • 2 comments

_document.js:

import Document from 'next/document';
import { augmentDocumentWithEmotionCache } from './_app';

//You can also pass your custom document if you have one.
augmentDocumentWithEmotionCache(Document);

export default Document;

Amp pages show TypeError: Cannot read properties of undefined (reading '__html')

Without tss-react no issues:

import Document from 'next/document';

export default Document;

tiotdev avatar Nov 26 '23 17:11 tiotdev