🏗️ 💥 Change the whole folder structure.
Now using src as a subfolder to the source files
This commit is contained in:
22
src/pages/_document.tsx
Normal file
22
src/pages/_document.tsx
Normal file
@@ -0,0 +1,22 @@
|
||||
import Document, { DocumentContext } from 'next/document';
|
||||
import { ServerStyles, createStylesServer } from '@mantine/next';
|
||||
|
||||
const stylesServer = createStylesServer();
|
||||
|
||||
export default class _Document extends Document {
|
||||
static async getInitialProps(ctx: DocumentContext) {
|
||||
const initialProps = await Document.getInitialProps(ctx);
|
||||
|
||||
// Add your app specific logic here
|
||||
|
||||
return {
|
||||
...initialProps,
|
||||
styles: (
|
||||
<>
|
||||
{initialProps.styles}
|
||||
<ServerStyles html={initialProps.html} server={stylesServer} />
|
||||
</>
|
||||
),
|
||||
};
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user