Skip to content

Conversation

@AladinoBorges
Copy link
Contributor

@AladinoBorges AladinoBorges commented Jan 6, 2026

Description of changes

Guard top-level web-component registration and prevent server-side DOM access so the @devopness/ui-react package can be safely imported during Next.js (16.0.8, App Router) rendering and build-time evaluation.

  • Mark client-only components as use client where appropriate to keep them out of server bundles and ensure runtime-only APIs execute only in the browser;
  • Keep React as a peer dependency and avoid bundling multiple React runtimes;
  • Add sideEffects: false in package.json to avoid bundling side-effectful modules into server builds;
  • Manual NextJS 16.0.8 app compatibility tests.

GitHub issues resolved by this PR

  • N/A (internal compatibility fixes to prevent SSR runtime errors)

Quality Assurance

  • Once the changes in this PR are merged and deployed, success criteria is:
    • Build: run a clean build in packages/ui/react and verify TypeScript and bundle outputs complete successfully;
    • Pack: run npm pack and ensure a tarball is produced (devopness-ui-react-*.tgz);
    • Runtime verification: install the tarball (or use bun link) into devopness-web-app and start the Next.js dev server. Confirm the app imports @devopness/ui-react without cannot read property of undefined (reading 'ReactCurrentDispatecher') or other SSR DOM-related errors;
    • Tests: run unit tests for the package; ensure no regressions.

More info

Identified Error (using the package with NextJS 16.0.8)

image

@changeset-bot
Copy link

changeset-bot bot commented Jan 6, 2026

🦋 Changeset detected

Latest commit: b3af308

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@devopness/ui-react Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@jfoliveira jfoliveira enabled auto-merge (squash) January 6, 2026 16:47
Copy link
Contributor

@jfoliveira jfoliveira left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@jfoliveira jfoliveira merged commit b269715 into devopness:main Jan 6, 2026
21 checks passed
@github-actions github-actions bot mentioned this pull request Jan 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants