react-code-dataset / next.js /turbopack /crates /turbopack-ecmascript /tests /tree-shaker /analyzer /amphtml-document /input.js
Download next.js/turbopack/crates/turbopack-ecmascript/tests/tree-shaker/analyzer/amphtml-document/input.js from Devendra174/react-code-dataset: direct link, hf CLI and curl.
- Browser
- Download file 1.06 kB
-
https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/next.js/turbopack/crates/turbopack-ecmascript/tests/tree-shaker/analyzer/amphtml-document/input.js
- Command line
-
hf download hf://datasets/Devendra174/react-code-dataset/next.js/turbopack/crates/turbopack-ecmascript/tests/tree-shaker/analyzer/amphtml-document/input.js
-
curl -L -o input.js https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/next.js/turbopack/crates/turbopack-ecmascript/tests/tree-shaker/analyzer/amphtml-document/input.js
1.06 kB
| import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime"; | |
| import Document, { Html, Head, Main, NextScript } from 'next/document'; | |
| class MyDocument extends Document { | |
| static async getInitialProps(ctx) { | |
| const initialProps = await Document.getInitialProps(ctx); | |
| return { | |
| ...initialProps, | |
| styles: _jsxs(_Fragment, { | |
| children: [ | |
| initialProps.styles, | |
| _jsx("style", { | |
| dangerouslySetInnerHTML: { | |
| __html: `html { background: hotpink; }` | |
| } | |
| }) | |
| ] | |
| }) | |
| }; | |
| } | |
| render() { | |
| return _jsxs(Html, { | |
| children: [ | |
| _jsx(Head, {}), | |
| _jsxs("body", { | |
| children: [ | |
| _jsx(Main, {}), | |
| _jsx(NextScript, {}) | |
| ] | |
| }) | |
| ] | |
| }); | |
| } | |
| } | |
| export default MyDocument; | |