Skip to content

Commit 6ec95c3

Browse files
authored
Actually use webpack (#284)
After bumping to next 16, we forgot to set --webpack in next dev and build
1 parent 00efdfb commit 6ec95c3

File tree

2 files changed

+9
-5
lines changed

2 files changed

+9
-5
lines changed

workbench/nextjs-webpack/README.md

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,12 @@
22

33
This directory is mostly a clone of the turbopack workbench with nearly everything symlinked to the directory.
44

5-
The `package.json` is notably different - it does NOT use `--turbo` to force webpack bundling.
5+
The `package.json` is notably different - it uses `--webpack` for dev and build modes.
66

77
## Symlinks
88

99
Most files/directories are symlinked to `../nextjs-turbopack`:
10+
1011
- `app/` - All files inside are symlinked (not the directory itself)
1112
- `workflows/` - Symlinked directory
1213
- `util/` - Symlinked directory
@@ -17,15 +18,18 @@ Most files/directories are symlinked to `../nextjs-turbopack`:
1718
- `turbo.json` - Symlinked file
1819

1920
A few specific files are NOT symlinked:
21+
2022
- `app/favicon.ico` - Real file (symlink doesn't work with Next.js)
2123
- `app/.well-known/` - Generated directory by workflow
2224
- `.gitignore` - Real file
2325
- `next.config.ts` - Different configuration (webpack-specific)
24-
- `package.json` - Different configuration (no `--turbo` flag)
26+
- `package.json` - Different configuration (`--webpack` flag)
2527

2628
## CI Symlink Resolution
2729

2830
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:
31+
2932
- Only runs when `CI` environment variable is set
3033
- Resolves all symlinks in the directory (excluding gitignored files like `node_modules`)
31-
- Preserves the directory structure while replacing symlinks with real files
34+
- Preserves the directory structure while replacing symlinks with real files
35+

workbench/nextjs-webpack/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
"private": true,
55
"license": "Apache-2.0",
66
"scripts": {
7-
"dev": "next dev",
8-
"build": "next build",
7+
"dev": "next dev --webpack",
8+
"build": "next build --webpack",
99
"clean": "rm -rf .next .swc app/.well-known/workflow",
1010
"start": "next start",
1111
"lint": "next lint"

0 commit comments

Comments
 (0)