2022-09-14 18:43:51 -07:00
|
|
|
import { ColorModeScript } from "@chakra-ui/react";
|
2022-09-14 18:04:10 -07:00
|
|
|
import Document, { Html, Head, Main, NextScript } from "next/document";
|
[WIP] Run cra-to-next codemod to be on Nextjs
I'm interested in ejecting from Vercel, so I'm trying to get off their proprietary-ish create-react-app + Vercel API thing, and onto Nextjs, which is very similar in shape, but more portable.
I had to disable `craCompat` in `next.config.js` to stop us from crashing on their webpack config, see https://github.com/vercel/next.js/discussions/25858#discussioncomment-1573822
The frontend seems to work at a basic level, but network requests fail, and images don't seem to be working. I'll work on those next!
Note that this commit was forced through despite failing lint checks. We'll need to fix that up too!
Also, after the codemod, I moved `src/pages` to the more canonical location `pages`. Lint tooling seemed surprised to not find a `pages` directory, and I didn't see a config that was making it work correctly in the other location, so I figured it's that Next is willing to check `pages` or `src/pages`? But this is more canonical so yeah!
2021-11-01 21:48:09 -07:00
|
|
|
|
|
|
|
class MyDocument extends Document {
|
|
|
|
render() {
|
|
|
|
return (
|
|
|
|
<Html lang="en">
|
|
|
|
<Head>
|
|
|
|
<meta charSet="utf-8" />
|
2022-09-14 18:04:10 -07:00
|
|
|
<link
|
|
|
|
rel="icon"
|
|
|
|
type="image/png"
|
|
|
|
sizes="32x32"
|
2022-09-14 18:44:43 -07:00
|
|
|
href="/favicon-32x32.png"
|
2022-09-14 18:04:10 -07:00
|
|
|
/>
|
|
|
|
<link
|
|
|
|
rel="icon"
|
|
|
|
type="image/png"
|
|
|
|
sizes="16x16"
|
2022-09-14 18:44:43 -07:00
|
|
|
href="favicon-16x16.png"
|
2022-09-14 18:04:10 -07:00
|
|
|
/>
|
[WIP] Run cra-to-next codemod to be on Nextjs
I'm interested in ejecting from Vercel, so I'm trying to get off their proprietary-ish create-react-app + Vercel API thing, and onto Nextjs, which is very similar in shape, but more portable.
I had to disable `craCompat` in `next.config.js` to stop us from crashing on their webpack config, see https://github.com/vercel/next.js/discussions/25858#discussioncomment-1573822
The frontend seems to work at a basic level, but network requests fail, and images don't seem to be working. I'll work on those next!
Note that this commit was forced through despite failing lint checks. We'll need to fix that up too!
Also, after the codemod, I moved `src/pages` to the more canonical location `pages`. Lint tooling seemed surprised to not find a `pages` directory, and I didn't see a config that was making it work correctly in the other location, so I figured it's that Next is willing to check `pages` or `src/pages`? But this is more canonical so yeah!
2021-11-01 21:48:09 -07:00
|
|
|
<meta name="theme-color" content="#000000" />
|
2022-09-14 18:04:10 -07:00
|
|
|
<link
|
|
|
|
rel="apple-touch-icon"
|
|
|
|
sizes="180x180"
|
2022-09-14 18:44:43 -07:00
|
|
|
href="/apple-touch-icon.png"
|
2022-09-14 18:04:10 -07:00
|
|
|
/>
|
|
|
|
<style
|
|
|
|
type="text/css"
|
|
|
|
dangerouslySetInnerHTML={{
|
|
|
|
__html: `
|
2020-05-18 00:56:46 -07:00
|
|
|
/* A font by Jos Buivenga (exljbris) -> www.exljbris.com */
|
|
|
|
@font-face {
|
|
|
|
font-family: "Delicious";
|
2020-05-18 00:59:10 -07:00
|
|
|
font-display: block; /* used for large-but-late subheadings */
|
2020-05-18 00:56:46 -07:00
|
|
|
font-weight: 700;
|
|
|
|
src: url(/fonts/Delicious-Bold.otf);
|
|
|
|
}
|
|
|
|
|
|
|
|
@font-face {
|
|
|
|
font-family: "Delicious";
|
2020-05-18 00:59:10 -07:00
|
|
|
font-display: swap; /* used for page titles */
|
2020-05-18 00:56:46 -07:00
|
|
|
font-weight: 800 1000;
|
|
|
|
src: url(/fonts/Delicious-Heavy.otf);
|
|
|
|
}
|
2022-09-14 18:04:10 -07:00
|
|
|
`,
|
|
|
|
}}
|
|
|
|
/>
|
|
|
|
<script
|
|
|
|
defer
|
|
|
|
data-domain="impress-2020.openneo.net"
|
2023-12-04 22:46:14 -08:00
|
|
|
src="https://analytics.openneo.net/js/script.js"
|
2022-09-14 18:04:10 -07:00
|
|
|
dangerouslySetInnerHTML={{ __html: `` }}
|
|
|
|
/>
|
|
|
|
<link
|
|
|
|
rel="preload"
|
|
|
|
href="/fonts/Delicious-Heavy.otf"
|
|
|
|
type="font/otf"
|
|
|
|
as="font"
|
|
|
|
crossOrigin=""
|
|
|
|
/>
|
|
|
|
<link
|
|
|
|
rel="preload"
|
|
|
|
href="/fonts/Delicious-Bold.otf"
|
|
|
|
type="font/otf"
|
|
|
|
as="font"
|
|
|
|
crossOrigin=""
|
|
|
|
/>
|
2022-09-14 18:43:51 -07:00
|
|
|
<ColorModeScript initialColorMode="light" />
|
[WIP] Run cra-to-next codemod to be on Nextjs
I'm interested in ejecting from Vercel, so I'm trying to get off their proprietary-ish create-react-app + Vercel API thing, and onto Nextjs, which is very similar in shape, but more portable.
I had to disable `craCompat` in `next.config.js` to stop us from crashing on their webpack config, see https://github.com/vercel/next.js/discussions/25858#discussioncomment-1573822
The frontend seems to work at a basic level, but network requests fail, and images don't seem to be working. I'll work on those next!
Note that this commit was forced through despite failing lint checks. We'll need to fix that up too!
Also, after the codemod, I moved `src/pages` to the more canonical location `pages`. Lint tooling seemed surprised to not find a `pages` directory, and I didn't see a config that was making it work correctly in the other location, so I figured it's that Next is willing to check `pages` or `src/pages`? But this is more canonical so yeah!
2021-11-01 21:48:09 -07:00
|
|
|
<noscript>You need to enable JavaScript to run this app.</noscript>
|
|
|
|
</Head>
|
2022-09-14 18:04:10 -07:00
|
|
|
|
[WIP] Run cra-to-next codemod to be on Nextjs
I'm interested in ejecting from Vercel, so I'm trying to get off their proprietary-ish create-react-app + Vercel API thing, and onto Nextjs, which is very similar in shape, but more portable.
I had to disable `craCompat` in `next.config.js` to stop us from crashing on their webpack config, see https://github.com/vercel/next.js/discussions/25858#discussioncomment-1573822
The frontend seems to work at a basic level, but network requests fail, and images don't seem to be working. I'll work on those next!
Note that this commit was forced through despite failing lint checks. We'll need to fix that up too!
Also, after the codemod, I moved `src/pages` to the more canonical location `pages`. Lint tooling seemed surprised to not find a `pages` directory, and I didn't see a config that was making it work correctly in the other location, so I figured it's that Next is willing to check `pages` or `src/pages`? But this is more canonical so yeah!
2021-11-01 21:48:09 -07:00
|
|
|
<body>
|
|
|
|
<Main />
|
|
|
|
<NextScript />
|
|
|
|
</body>
|
|
|
|
</Html>
|
2022-09-14 18:04:10 -07:00
|
|
|
);
|
[WIP] Run cra-to-next codemod to be on Nextjs
I'm interested in ejecting from Vercel, so I'm trying to get off their proprietary-ish create-react-app + Vercel API thing, and onto Nextjs, which is very similar in shape, but more portable.
I had to disable `craCompat` in `next.config.js` to stop us from crashing on their webpack config, see https://github.com/vercel/next.js/discussions/25858#discussioncomment-1573822
The frontend seems to work at a basic level, but network requests fail, and images don't seem to be working. I'll work on those next!
Note that this commit was forced through despite failing lint checks. We'll need to fix that up too!
Also, after the codemod, I moved `src/pages` to the more canonical location `pages`. Lint tooling seemed surprised to not find a `pages` directory, and I didn't see a config that was making it work correctly in the other location, so I figured it's that Next is willing to check `pages` or `src/pages`? But this is more canonical so yeah!
2021-11-01 21:48:09 -07:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2022-09-14 18:04:10 -07:00
|
|
|
export default MyDocument;
|