Skip to content

Commit d530440

Browse files
dev/todo: Note the webpack to Turbopack dev migration
Amp-Thread-ID: https://ampcode.com/threads/T-01a0ad75-46cf-77ed-889b-438e2521bc89 Co-authored-by: Amp <amp@ampcode.com>
1 parent 8da3bd4 commit d530440

1 file changed

Lines changed: 6 additions & 5 deletions

File tree

‎dev/TODO.md‎

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,12 @@
44
React Compiler ESLint rules `react-hooks/refs`, `react-hooks/set-state-in-effect`
55
and `react-hooks/static-components` can go back to `error` in `eslint.config.mjs`
66
(31 of the 39 warnings from `pnpm run lint` are in that directory)
7-
- `pnpm run dev` (`next dev --webpack`) fails to serve pages on main since the
8-
Next 16 upgrade: `ReferenceError: require is not defined` from
9-
`next/src/build/webpack/loaders/postcss-loader`. Fix it, or move dev to
10-
Turbopack by running `contentlayer2 dev` alongside `next dev` and dropping
11-
the `next-contentlayer2` plugin from `next.config.js` entirely
7+
- Move `pnpm run dev` from webpack to Turbopack, like `pnpm run build`. The only
8+
thing keeping it on webpack is the `next-contentlayer2` plugin, which
9+
regenerates `.contentlayer` when an `.mdx` file changes; Turbopack has no
10+
plugin hook for that. Needs a way to start contentlayer's watcher
11+
(`contentlayer2 dev`) automatically when `next dev` starts, then the plugin
12+
and the `PHASE_DEVELOPMENT_SERVER` branch in `next.config.js` can go
1213
- Faster Vercel static generation: the 505 `/api/og` images are ~40% of the
1314
"Generating static pages" time (locally 6.6s with them, 3.6s without).
1415
Options: hoist the font and logo reads in `src/app/api/og/[...path]/route.tsx`

0 commit comments

Comments
 (0)