Skip to content
Merged
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
10 changes: 7 additions & 3 deletions workbench/nextjs-webpack/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
- Preserves the directory structure while replacing symlinks with real files

4 changes: 2 additions & 2 deletions workbench/nextjs-webpack/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
Loading