Skip to content

Commit 4efe72d

Browse files
committed
docs: explain the Turbopack opt-out in next.config.js
Expand the comment above the empty `turbopack: {}` to explain why the build runs on webpack (custom webpack config + Sandpack raw-loader imports aren't Turbopack-ready) and that it's a tracked follow-up.
1 parent 155e4ac commit 4efe72d

1 file changed

Lines changed: 7 additions & 2 deletions

File tree

next.config.js

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,13 @@ const nextConfig = {
2828
'remark-gfm',
2929
'remark-frontmatter',
3030
],
31-
// Custom webpack config: opt out of Turbopack for builds.
32-
// TODO: migrate webpack tweaks to Turbopack config.
31+
// Next 16 defaults to Turbopack, but this project still relies on the custom
32+
// `webpack()` config below (module aliases, IgnorePlugin, and Sandpack's
33+
// `raw-loader` imports) which Turbopack can't run yet. The build scripts pass
34+
// `--webpack` to force the webpack pipeline; this empty `turbopack` object
35+
// silences the "webpack config without turbopack config" warning in the
36+
// meantime.
37+
// TODO: port the webpack customizations to Turbopack and drop `--webpack`.
3338
turbopack: {},
3439
async rewrites() {
3540
return {

0 commit comments

Comments
 (0)