Skip to content

BUG [with-cloudflare-d1 template] styles from frontend being loaded in payload admin #13989

@nwong212

Description

@nwong212

Describe the Bug

Hi! I made a fresh 1-click deploy of the new cloudflare template and it seems like the styles from the frontend folder are being loaded in the admin panel. I've made a fresh clone of the blank template and this problem does not happen.

  • The Login page has a black background with black text in light mode
  • Font base size is set to 18px rather than the default 13px
  • Removing the styles.css file from src/app/(frontend) fixes the problem, removing the import in both src/app/(frontend)/layout.tsx and src/app/(frontend)/page.tsx does not fix the problem.
  • Thought it might have to do with cssChunking in Next, but tried setting it to both false and 'strict' and neither made any change.
Image screenshot of extra large type Image black and black when in light-theme

Link to the code that reproduces this issue

https://github.com/nwong212/cf-payload-reproduce

Reproduction Steps

  1. Deploy to Cloudflare Workers with 1-Click Deploy: https://deploy.workers.cloudflare.com/?url=https://github.com/payloadcms/payload/tree/main/templates/with-cloudflare-d1
  2. use default settings
  3. wait for deploy
  4. clone to local machine
  5. pnpm i
  6. pnpm dev
  7. navigate to localhost:3000/admin

Which area(s) are affected? (Select all that apply)

area: ui

Environment Info

Binaries:
  Node: 24.7.0
  npm: 11.5.1
  Yarn: N/A
  pnpm: 10.15.1
Relevant Packages:
  payload: 3.58.0
  next: 15.5.4
  @payloadcms/email-nodemailer: 3.58.0
  @payloadcms/graphql: 3.58.0
  @payloadcms/next/utilities: 3.58.0
  @payloadcms/payload-cloud: 3.58.0
  @payloadcms/plugin-cloud-storage: 3.58.0
  @payloadcms/richtext-lexical: 3.58.0
  @payloadcms/translations: 3.58.0
  @payloadcms/ui/shared: 3.58.0
  react: 19.1.1
  react-dom: 19.1.1
Operating System:
  Platform: darwin
  Arch: arm64
  Version: Darwin Kernel Version 24.6.0: Mon Jul 14 11:30:40 PDT 2025; root:xnu-11417.140.69~1/RELEASE_ARM64_T6041
  Available memory (MB): 36864
  Available CPU cores: 14

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions