[PR #30294] fix(web): rollback React Scan dynamic import #32762

Closed
opened 2026-02-21 20:52:01 -05:00 by yindo · 0 comments
Owner

Original Pull Request: https://github.com/langgenius/dify/pull/30294

State: closed
Merged: Yes


Summary

  • Roll back the React Scan dynamic import added in #30279.

Background

#30279 moved React Scan to next/dynamic with ssr: false inside web/app/layout.tsx, which is a Server Component. Next.js rejects ssr: false in Server Components, so the build fails.

Fix

  • Restore the static ReactScan import in web/app/layout.tsx.
  • Remove the server-side next/dynamic/IS_DEV gate (React Scan still guards itself at runtime).

Testing

  • cd web && pnpm lint-staged
  • cd web && pnpm type-check:tsgo
**Original Pull Request:** https://github.com/langgenius/dify/pull/30294 **State:** closed **Merged:** Yes --- ## Summary - Roll back the React Scan dynamic import added in #30279. ## Background #30279 moved React Scan to `next/dynamic` with `ssr: false` inside `web/app/layout.tsx`, which is a Server Component. Next.js rejects `ssr: false` in Server Components, so the build fails. ## Fix - Restore the static `ReactScan` import in `web/app/layout.tsx`. - Remove the server-side `next/dynamic`/`IS_DEV` gate (React Scan still guards itself at runtime). ## Testing - `cd web && pnpm lint-staged` - `cd web && pnpm type-check:tsgo`
yindo added the pull-request label 2026-02-21 20:52:01 -05:00
yindo closed this issue 2026-02-21 20:52:01 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#32762