fix(frontend): remove invalid turbopack config key#3318
Conversation
Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings. WalkthroughMigrates Turbopack enablement from Next.js config to the dev CLI, adds React-Leaflet packages to Next.js transpilation, removes a side-effect import for marker clustering in ChapterMap, and adds "Turbopack" to the cspell custom dictionary. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
Suggested labels
Suggested reviewers
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 0
🧹 Nitpick comments (2)
.gitignore (1)
41-41: Consider scoping the ignore pattern tofrontend/.The pattern
pnpm-workspace.yamlat root level will ignore this file anywhere in the repository. If the intent is only to ignore the auto-generated file in the frontend directory, usefrontend/pnpm-workspace.yamlfor precision.Additionally, this entry appears out of the alphabetical grouping for
frontend/prefixed entries.Suggested change
-pnpm-workspace.yaml +frontend/pnpm-workspace.yamlPlace it after line 38 (
frontend/pnpm-debug.log*) to maintain alphabetical order within thefrontend/section.frontend/next.config.ts (1)
32-32: Minor: Inconsistent indentation.Line 32 has an extra leading space before the comment. Same issue on line 54. This doesn't affect functionality but creates inconsistent formatting.
🔧 Suggested fix
- // https://nextjs.org/docs/app/api-reference/config/next-config-js/poweredByHeader + // https://nextjs.org/docs/app/api-reference/config/next-config-js/poweredByHeaderAnd for line 54:
- // https://docs.sentry.io/platforms/javascript/guides/nextjs/sourcemaps + // https://docs.sentry.io/platforms/javascript/guides/nextjs/sourcemaps
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (7)
.gitignorecspell/custom-dict.txtdocker-compose/local/compose.yamlfrontend/next.config.tsfrontend/package.jsonfrontend/pnpm-workspace.yamlfrontend/src/components/ChapterMap.tsx
🧰 Additional context used
🧠 Learnings (2)
📚 Learning: 2025-12-26T06:08:58.549Z
Learnt from: ahmedxgouda
Repo: OWASP/Nest PR: 3041
File: .github/workflows/run-ci-cd.yaml:233-243
Timestamp: 2025-12-26T06:08:58.549Z
Learning: Ensure Redis image versions stay in sync across all environments by updating every relevant YAML file together (docker-compose files and CI/CD workflow configurations). When upgrading Redis, bump the image version in all docker-compose files and in all CI workflow YAMLs in one coordinated change to maintain parity across production, staging, local, E2E, and CI tests.
Applied to files:
frontend/pnpm-workspace.yamldocker-compose/local/compose.yaml
📚 Learning: 2025-10-26T12:50:50.512Z
Learnt from: ahmedxgouda
Repo: OWASP/Nest PR: 2429
File: backend/Makefile:30-32
Timestamp: 2025-10-26T12:50:50.512Z
Learning: The `exec-backend-e2e-command` and `exec-db-e2e-command` Makefile targets in the backend/Makefile are intended for local development and debugging only, not for CI/CD execution, so the `-it` flags are appropriate.
Applied to files:
docker-compose/local/compose.yaml
🔇 Additional comments (6)
frontend/pnpm-workspace.yaml (1)
1-7: Verify intent: this file is being gitignored.This
pnpm-workspace.yamlfile configuresignoredBuiltDependenciesto suppress build warnings for packages with native bindings. However, the.gitignorechange in this PR addspnpm-workspace.yamlto the ignore list.If this file is auto-generated by pnpm and intentionally not committed, the configuration will need to be regenerated on each fresh clone. If the intent is to share this configuration across the team, consider removing it from
.gitignore.docker-compose/local/compose.yaml (1)
88-108: LGTM!The simplified command and addition of
stdin_open: true/tty: trueare appropriate for local development. This aligns with the PR objective of improving frontend dev stability when using Turbopack in Docker, and the direct command format is cleaner than the previoussh -cwrapper.cspell/custom-dict.txt (1)
32-32: LGTM!The dictionary additions for "Turbopack" and "unrs" (line 140) are appropriate for this PR and maintain alphabetical ordering.
frontend/package.json (1)
7-7: Remove the--turboflag — Turbopack is the default bundler in Next.js 16.In Next.js 16.1.1, Turbopack is the default bundler and no longer requires the
--turboflag. The dev script should be:"dev": "next dev --port 3000",If Webpack is needed instead, use
--webpackto opt out. The--turboflag is legacy syntax for Next.js 16+.Likely an incorrect or invalid review comment.
frontend/next.config.ts (1)
8-9: Correct addition for ESM Leaflet package compatibility.Adding
transpilePackagesfor the Leaflet ecosystem packages ensures proper transpilation when using Turbopack and React 19. This aligns well with the ChapterMap.tsx changes and the PR's goal of enabling Turbopack via CLI.frontend/src/components/ChapterMap.tsx (1)
17-18: LGTM - Dependency management correctly simplified.The removal of the
leaflet.markerclusterside-effect import is correct sincereact-leaflet-clusterdeclaresleaflet.markerclusteras a regular dependency, making it automatically available without an explicit import. The CSS imports at lines 14-15 are properly retained, as they must be manually imported in modern setups for cluster styling.
|



### Proposed change
Resolves #3275
** What was fixed**
This PR fixes warnings and instability in the frontend local development setup when using Turbopack with Docker.
Changes included:
experimental.turboconfiguration fromnext.config.ts, which caused the warning:Unrecognized key(s) in object: 'turbo' at "experimental"next dev --turbo)sh -c)stdin_open: trueandtty: trueto keep the frontend container attached and prevent premature exit during developmentWhy this change is needed
Recent Next.js versions no longer support enabling Turbopack via configuration files.
Keeping the invalid key resulted in warnings and unstable behavior.
In Docker-based development, running the dev server without an attached TTY can cause the process to exit immediately.
Running the command directly and enabling STDIN/TTY ensures the frontend dev server remains active and behaves consistently.
Scope of change
Checklist
make check-testlocally (blocked by local environment limitations)