Skip to content

Commit d65e66c

Browse files
committed
updated to next@16
1 parent 8342bbf commit d65e66c

File tree

9 files changed

+109
-123
lines changed

9 files changed

+109
-123
lines changed

docs/next-env.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/// <reference types="next" />
22
/// <reference types="next/image-types/global" />
3-
/// <reference path="./.next/types/routes.d.ts" />
3+
import "./.next/dev/types/routes.d.ts";
44

55
// NOTE: This file should not be edited
66
// see https://nextjs.org/docs/pages/api-reference/config/typescript for more information.

docs/next.config.ts

Lines changed: 19 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import process from 'node:process';
21
import type { NextConfig } from 'next';
32
import rehypeSlug from 'rehype-slug';
43
import rehypeAutolinkHeadings, {
@@ -13,10 +12,27 @@ import remarkFrontmatter from 'remark-frontmatter';
1312
import remarkMdxFrontmatter, {
1413
RemarkMdxFrontmatterOptions,
1514
} from 'remark-mdx-frontmatter';
16-
import nextMdx from '@next/mdx';
15+
import createMDX from '@next/mdx';
1716
import recmaNextjsStaticProps from 'recma-nextjs-static-props';
1817

19-
const withMdx = nextMdx({
18+
const nextConfig: NextConfig = {
19+
transpilePackages: ['orval'],
20+
experimental: {
21+
// fixes:
22+
// Module not found: ESM packages (chalk) need to be imported. Use 'import' to reference the package instead. https://nextjs.org/docs/messages/import-esm-externals
23+
esmExternals: 'loose',
24+
},
25+
// Support MDX files as pages:
26+
pageExtensions: ['md', 'mdx', 'tsx', 'ts', 'jsx', 'js'],
27+
rewrites: async () => [
28+
{
29+
source: '/docs{/}?',
30+
destination: '/docs/overview',
31+
},
32+
],
33+
};
34+
35+
const withMdx = createMDX({
2036
// By default only the `.mdx` extension is supported.
2137
extension: /\.mdx?$/,
2238
options: {
@@ -51,35 +67,4 @@ const withMdx = nextMdx({
5167
},
5268
});
5369

54-
const nextConfig: NextConfig = {
55-
transpilePackages: ['orval'],
56-
experimental: {
57-
// fixes:
58-
// Module not found: ESM packages (chalk) need to be imported. Use 'import' to reference the package instead. https://nextjs.org/docs/messages/import-esm-externals
59-
esmExternals: 'loose',
60-
},
61-
// Support MDX files as pages:
62-
pageExtensions: ['md', 'mdx', 'tsx', 'ts', 'jsx', 'js'],
63-
rewrites: async () => [
64-
{
65-
source: '/docs{/}?',
66-
destination: '/docs/overview',
67-
},
68-
],
69-
webpack: (config, { dev, isServer }) => {
70-
if (!dev && isServer) {
71-
// we're in build mode so enable shared caching for the GitHub API
72-
process.env.USE_CACHE = 'true';
73-
const originalEntry = config.entry;
74-
75-
config.entry = async () => {
76-
const entries = { ...(await originalEntry()) };
77-
return entries;
78-
};
79-
}
80-
81-
return config;
82-
},
83-
};
84-
8570
export default withMdx(nextConfig);

docs/package.json

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -5,37 +5,37 @@
55
"license": "MIT",
66
"type": "module",
77
"scripts": {
8-
"dev": "next dev",
9-
"build": "next build && yarn sitemap",
8+
"dev": "next dev --webpack",
9+
"build": "next build --webpack && yarn sitemap",
1010
"start": "next start",
1111
"sitemap": "node ./scripts/build-sitemap.js"
1212
},
1313
"dependencies": {
1414
"@docsearch/css": "3.9.0",
1515
"@docsearch/react": "3.9.0",
16-
"@mdx-js/loader": "^3.1.0",
17-
"@mdx-js/react": "^3.1.0",
16+
"@mdx-js/loader": "^3.1.1",
17+
"@mdx-js/react": "^3.1.1",
1818
"@monaco-editor/react": "^4.7.0",
19-
"@next/mdx": "^15.4.6",
19+
"@next/mdx": "16.0.0",
2020
"@octokit/graphql": "^9.0.1",
2121
"@reactions/component": "^2.0.2",
2222
"@tanstack/react-query": "^5.85.3",
2323
"@types/mdx": "^2.0.13",
24-
"@types/react": "^19.1.10",
25-
"@types/react-dom": "^19.1.7",
24+
"@types/react": "19.2.2",
25+
"@types/react-dom": "19.2.2",
2626
"axios": "^1.12.0",
2727
"body-scroll-lock": "^3.1.5",
2828
"classnames": "^2.5.1",
2929
"copy-to-clipboard": "^3.3.3",
3030
"dedent": "^1.6.0",
3131
"docsearch.js": "^2.6.3",
32-
"next": "^15.4.6",
32+
"next": "16.0.0",
3333
"orval": "*",
3434
"prettier": "3.6.2",
3535
"prism-react-renderer": "^2.4.1",
3636
"prismjs": "^1.30.0",
37-
"react": "^19.1.1",
38-
"react-dom": "^19.1.1",
37+
"react": "19.2.0",
38+
"react-dom": "19.2.0",
3939
"react-icons": "^5.5.0",
4040
"react-live": "^4.1.8",
4141
"react-select": "^5.10.2",
@@ -44,7 +44,7 @@
4444
"rehype-slug": "^6.0.0",
4545
"rehype-unwrap-images": "^1.0.0",
4646
"remark": "^15.0.1",
47-
"remark-emoji": "^5.0.1",
47+
"remark-emoji": "^5.0.2",
4848
"remark-frontmatter": "^5.0.0",
4949
"remark-gfm": "^4.0.1",
5050
"remark-images": "^4.1.0",
@@ -56,11 +56,11 @@
5656
},
5757
"devDependencies": {
5858
"@tailwindcss/forms": "^0.5.10",
59-
"@tailwindcss/postcss": "^4.1.12",
59+
"@tailwindcss/postcss": "^4.1.15",
6060
"monaco-editor": "^0.52.2",
6161
"nextjs-sitemap-generator": "^1.3.1",
6262
"postcss": "8.5.6",
63-
"tailwindcss": "^4.1.12"
63+
"tailwindcss": "^4.1.15"
6464
},
6565
"engines": {
6666
"node": "22.x"

docs/postcss.config.mjs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
const config = {
2-
plugins: ["@tailwindcss/postcss"],
1+
export default {
2+
plugins: {
3+
'@tailwindcss/postcss': {},
4+
},
35
};
4-
5-
export default config;

docs/src/components/Toc.module.css

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
/* purgecss start ignore */
2+
@reference "../styles/index.css";
23

34
.contents__list {
45
overflow: overlay;

docs/src/components/blog-markdown.module.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/* purgecss start ignore */
2-
@reference "tailwindcss";
2+
@reference "../styles/index.css";
33

44
.markdown {
55
@apply leading-relaxed text-gray-800 text-base;

docs/src/components/markdown.module.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/* purgecss start ignore */
2-
@reference "tailwindcss";
2+
@reference "../styles/index.css";
33

44
.markdown {
55
@apply leading-relaxed text-gray-800 text-base;

docs/tsconfig.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
"moduleResolution": "bundler",
1212
"resolveJsonModule": true,
1313
"isolatedModules": true,
14-
"jsx": "preserve",
14+
"jsx": "react-jsx",
1515
"incremental": true,
1616
"plugins": [
1717
{
@@ -20,7 +20,7 @@
2020
],
2121
"paths": {
2222
"@/*": ["./src/*"]
23-
},
23+
}
2424
},
2525
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts"],
2626
"exclude": ["node_modules"]

0 commit comments

Comments
 (0)