From cf0441386431eb00fb5c4acd5f227a37165fec66 Mon Sep 17 00:00:00 2001 From: Pranay Prakash Date: Sat, 8 Nov 2025 21:20:11 -0500 Subject: [PATCH] Actually use webpack After bumping to next 16, we forgot to set --webpack in next dev and build --- workbench/nextjs-webpack/README.md | 10 +++++++--- workbench/nextjs-webpack/package.json | 4 ++-- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/workbench/nextjs-webpack/README.md b/workbench/nextjs-webpack/README.md index ffb00ef37..47a0c5877 100644 --- a/workbench/nextjs-webpack/README.md +++ b/workbench/nextjs-webpack/README.md @@ -2,11 +2,12 @@ This directory is mostly a clone of the turbopack workbench with nearly everything symlinked to the directory. -The `package.json` is notably different - it does NOT use `--turbo` to force webpack bundling. +The `package.json` is notably different - it uses `--webpack` for dev and build modes. ## Symlinks Most files/directories are symlinked to `../nextjs-turbopack`: + - `app/` - All files inside are symlinked (not the directory itself) - `workflows/` - Symlinked directory - `util/` - Symlinked directory @@ -17,15 +18,18 @@ Most files/directories are symlinked to `../nextjs-turbopack`: - `turbo.json` - Symlinked file A few specific files are NOT symlinked: + - `app/favicon.ico` - Real file (symlink doesn't work with Next.js) - `app/.well-known/` - Generated directory by workflow - `.gitignore` - Real file - `next.config.ts` - Different configuration (webpack-specific) -- `package.json` - Different configuration (no `--turbo` flag) +- `package.json` - Different configuration (`--webpack` flag) ## CI Symlink Resolution Next.js dev mode doesn't work well with symlinks. In CI, the `resolve-symlinks.sh` script automatically runs before starting the dev server to replace all symlinks with actual file copies. The script: + - Only runs when `CI` environment variable is set - Resolves all symlinks in the directory (excluding gitignored files like `node_modules`) -- Preserves the directory structure while replacing symlinks with real files \ No newline at end of file +- Preserves the directory structure while replacing symlinks with real files + diff --git a/workbench/nextjs-webpack/package.json b/workbench/nextjs-webpack/package.json index c9c829021..2a7b0fba1 100644 --- a/workbench/nextjs-webpack/package.json +++ b/workbench/nextjs-webpack/package.json @@ -4,8 +4,8 @@ "private": true, "license": "Apache-2.0", "scripts": { - "dev": "next dev", - "build": "next build", + "dev": "next dev --webpack", + "build": "next build --webpack", "clean": "rm -rf .next .swc app/.well-known/workflow", "start": "next start", "lint": "next lint"