🦜
Size: a a a
🦜
V
▲R
TypeError: e.createShadowRoot is not a function
IndexPage.getInitialProps = ({ AppTree, asPath, query, pathname }) => {
return { AppTree, asPath, query, pathname };
}
🦜
V
V
🦜
V
NN
V
🦜
🦜
V
🦜
🦜
V
▲R
▲R
V
V
import Document, {
DocumentContext,
Html,
Head,
Main,
NextScript
} from "next/document";
import sprite from "svg-sprite-loader/runtime/sprite.build";
class PDocument extends Document<{ spriteContent: any }> {
static async getInitialProps(ctx: DocumentContext) {
const initialProps = await Document.getInitialProps(ctx);
const spriteContent = sprite.stringify();
return { spriteContent, ...initialProps };
}
render() {
return (
<Html>
<Head />
<body>
<div dangerouslySetInnerHTML={{ __html: this.props.spriteContent }} />
<Main />
<NextScript />
</body>
</Html>
);
}
}
export default PDocument;