Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ node_modules
# next.js
/.next/
/out/
next-env.d.ts

# production
/build
Expand Down
5 changes: 0 additions & 5 deletions next-env.d.ts

This file was deleted.

19 changes: 18 additions & 1 deletion next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,28 @@
const nextConfig = {
pageExtensions: ['jsx', 'js', 'ts', 'tsx', 'mdx', 'md'],
reactStrictMode: true,
reactCompiler: true,
experimental: {
scrollRestoration: true,
reactCompiler: true,
},
env: {},
turbopack: {
resolveAlias: {
'use-sync-external-store/shim': 'react',
raf: require.resolve('./src/utils/rafShim.js'),

// Unfortunately not working at the moment
process: require.resolve('./src/utils/processShim.js'),

// ESLint depends on the CommonJS version of esquery,
// but Webpack loads the ESM version by default. This
// alias ensures the correct version is used.
//
// More info:
// https://github.com/reactjs/react.dev/pull/8115
esquery: 'esquery/dist/esquery.min.js',
},
},
webpack: (config, {dev, isServer, ...options}) => {
if (process.env.ANALYZE) {
const {BundleAnalyzerPlugin} = require('webpack-bundle-analyzer');
Expand Down
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
"analyze": "ANALYZE=true next build",
"dev": "next-remote-watch ./src/content",
"build": "next build && node --experimental-modules ./scripts/downloadFonts.mjs",
"lint": "next lint && eslint \"src/content/**/*.md\"",
"lint:fix": "next lint --fix && eslint \"src/content/**/*.md\" --fix",
"lint": "eslint .",
"lint:fix": "eslint . --fix",
"format:source": "prettier --config .prettierrc --write \"{plugins,src}/**/*.{js,ts,jsx,tsx,css}\"",
"nit:source": "prettier --config .prettierrc --list-different \"{plugins,src}/**/*.{js,ts,jsx,tsx,css}\"",
"prettier": "yarn format:source",
Expand All @@ -35,8 +35,8 @@
"classnames": "^2.2.6",
"debounce": "^1.2.1",
"github-slugger": "^1.3.0",
"next": "15.1.11",
"next-remote-watch": "^1.0.0",
"next": "16.1.0-canary.31",
"next-remote-watch": "^2.0.0",
"parse-numeric-range": "^1.2.0",
"react": "^19.0.0",
"react-collapsed": "4.0.4",
Expand Down
2 changes: 2 additions & 0 deletions src/utils/compileMDX.ts
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,8 @@ export default async function compileMDX(
const fakeRequire = (name: string) => {
if (name === 'react/jsx-runtime') {
return require('react/jsx-runtime');
} else if (name === 'react/jsx-dev-runtime') {
return require('react/jsx-dev-runtime');
} else {
// For each fake MDX import, give back the string component name.
// It will get serialized later.
Expand Down
2 changes: 1 addition & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"moduleResolution": "node",
"resolveJsonModule": true,
"isolatedModules": true,
"jsx": "preserve",
"jsx": "react-jsx",
"baseUrl": "src",
"incremental": true,
"plugins": [
Expand Down
478 changes: 235 additions & 243 deletions yarn.lock

Large diffs are not rendered by default.

Loading