Skip to content

chore(dev): make the dev app build and drop the unused mongodb adapter - #175

Merged
bvdaakster merged 2 commits into
mainfrom
chore/dev-build-and-unused-mongodb
Nov 27, 2026
Merged

bvdaakster merged 2 commits into
mainfrom
chore/dev-build-and-unused-mongodb

Conversation

@bvdaakster

Copy link
Copy Markdown
Contributor

Dev-only changes; nothing in the published package changes.

Dev playground: next build dev works again

  • No root layout: dev/app/page.tsx sat outside both route groups, so it had no root layout. Moved to dev/app/(frontend)/page.tsx (still serves /, redirects to /dashboard).
  • Plugin source failed type-checking against the dev types: dev/payload-types.ts ended with declare module 'payload' { interface GeneratedTypes extends Config {} }, which narrows Payload's types for every file in the program, including ../src. The plugin takes collection slugs as plain strings, so it cannot compile under that narrowing. The dev config now sets typescript.declare: false (and autoGenerate: false, so types only change through pnpm dev:generate-types), and payload-types.ts is regenerated; it was stale (Payload 3.94 adds payload-kv, widgets, etc.).
  • Remaining dev type errors: next/link does not type-check as a JSX component under the repo's nodenext resolution (which Turbopack needs to resolve the .js import specifiers), so the two playground pages use plain <a>; the test-email route read payload.mailing with an invalid in check; dev/tsconfig.json turns off composite/declaration inherited from the root config (the app emits nothing, and declarations for importMap.js cannot be named).
  • dev/next-env.d.ts is what Next 16 generates now.
  • New script pnpm dev:build, run as a CI step so the playground does not break silently again.

Unused devDependency

@payloadcms/db-mongodb removed. Nothing in src/, dev/, scripts, configs or workflows imports it; the dev app and the tests use @payloadcms/db-sqlite only.

Checks

pnpm lint, pnpm typecheck, pnpm test, pnpm test:int, pnpm build and pnpm dev:build pass locally.

🤖 Generated with Claude Code

https://claude.ai/code/session_0122PV8TJ7ELGdAX7H2hdrRU

`next build dev` failed: dev/app/page.tsx had no root layout, and the type
check failed because dev/payload-types.ts narrowed Payload's types for the
plugin source too. Move the home page under the (frontend) layout, generate
the types without the `declare module 'payload'` block, regenerate the stale
payload-types.ts, and fix the remaining dev type errors. Add `pnpm dev:build`
and run it in CI.

Remove the @payloadcms/db-mongodb devDependency: nothing imports it and the
dev app only uses SQLite.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0122PV8TJ7ELGdAX7H2hdrRU
@claude

claude Bot commented Nov 27, 2026

Copy link
Copy Markdown

Code review

No issues found. Checked for bugs and CLAUDE.md compliance.

@bvdaakster
bvdaakster merged commit 24d6ffc into main Nov 27, 2026
6 checks passed
@bvdaakster
bvdaakster deleted the chore/dev-build-and-unused-mongodb branch November 27, 2026 13:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant