fix(retail-store): configure Turbo build outputs for Next.js#343
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
✅ Files skipped from review due to trivial changes (1)
📝 WalkthroughWalkthroughAdds a Turbo pipeline configuration file to the retail-store example that defines a Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
77792b4 to
191c519
Compare
@prisma-next/mongo-runtime
@prisma-next/family-mongo
@prisma-next/sql-runtime
@prisma-next/family-sql
@prisma-next/middleware-telemetry
@prisma-next/extension-paradedb
@prisma-next/extension-pgvector
@prisma-next/postgres
@prisma-next/sql-orm-client
@prisma-next/sqlite
@prisma-next/target-mongo
@prisma-next/adapter-mongo
@prisma-next/driver-mongo
@prisma-next/contract
@prisma-next/utils
@prisma-next/config
@prisma-next/errors
@prisma-next/framework-components
@prisma-next/operations
@prisma-next/contract-authoring
@prisma-next/ids
@prisma-next/psl-parser
@prisma-next/psl-printer
@prisma-next/cli
@prisma-next/emitter
@prisma-next/migration-tools
@prisma-next/vite-plugin-contract-emit
@prisma-next/runtime-executor
@prisma-next/mongo-codec
@prisma-next/mongo-contract
@prisma-next/mongo-value
@prisma-next/mongo-contract-psl
@prisma-next/mongo-contract-ts
@prisma-next/mongo-emitter
@prisma-next/mongo-schema-ir
@prisma-next/mongo-query-ast
@prisma-next/mongo-orm
@prisma-next/mongo-pipeline-builder
@prisma-next/mongo-lowering
@prisma-next/mongo-wire
@prisma-next/sql-contract
@prisma-next/sql-errors
@prisma-next/sql-operations
@prisma-next/sql-schema-ir
@prisma-next/sql-contract-psl
@prisma-next/sql-contract-ts
@prisma-next/sql-contract-emitter
@prisma-next/sql-lane-query-builder
@prisma-next/sql-relational-core
@prisma-next/sql-builder
@prisma-next/target-postgres
@prisma-next/target-sqlite
@prisma-next/adapter-postgres
@prisma-next/adapter-sqlite
@prisma-next/driver-postgres
@prisma-next/driver-sqlite
commit: |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@examples/retail-store/turbo.json`:
- Around line 3-6: The package inherits root build.inputs via the "build" task
causing stale Next.js caches; update the "build" task to explicitly override
build.inputs (not just outputs) so it includes Next-specific globs like
"app/**", "pages/**" (if used), "middleware.ts", "next.config.js", and other
important files alongside existing src/package.json/tsconfig globs; locate the
"build" task object (the "build" key in the tasks map) and add a build.inputs
array that enumerates the required patterns to ensure proper invalidation.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yml
Review profile: CHILL
Plan: Pro
Run ID: f0d8ae67-cfd7-4612-a73f-e85d48466bd9
📒 Files selected for processing (1)
examples/retail-store/turbo.json
The root turbo.json declares dist/** as the expected build output, but retail-store is a Next.js app that outputs to .next/. This caused Turborepo to emit a warning about missing output files. Add a package-level turbo.json that overrides the build task outputs to .next/** (excluding .next/cache/**).
191c519 to
cead875
Compare
Problem
The root
turbo.jsondeclaresdist/**as the expected build output for allbuildtasks. However,retail-storeis a Next.js app whosenext buildoutputs to.next/, notdist/. This causes Turborepo to emit a warning on every build:Fix
Add a package-level
turbo.jsoninexamples/retail-store/that extends the root config and overrides thebuildtask outputs to.next/**(excluding.next/cache/**, which Next.js manages internally).This is the standard Turborepo pattern for Next.js apps.
Summary by CodeRabbit