Skip to content

Conversation

@lightninglu10
Copy link
Contributor

@lightninglu10 lightninglu10 commented Jan 9, 2026

Summary

Adjust CodePress configuration propagation and documentation.

Changes

  • Document new optional organization_id option for both SWC and Babel plugins in README.
  • Defer CodePress meta tag injection in the SWC plugin using setTimeout(0) to avoid conflicts with React Portal-based libraries.
  • Extend the main plugin to accept an optional organization_id and pass it through to window.CODEPRESS_CONFIG.
  • Update CodePressPluginOptions type definition to include organization_id with documentation.

@lightninglu10 lightninglu10 self-assigned this Jan 9, 2026
Copy link

Choose a reason for hiding this comment

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

🟡 OPTIONAL: Consider also including organizationId in the SWC-injected window.__CODEPRESS_CONFIG__ to keep behavior consistent with the Babel plugin. This would require threading organization_id through the SWC plugin config similarly to repo_name and branch_name.

Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

Review Summary

This PR refines how CodePress configuration and metadata are exposed and documented.

Key changes reviewed

  • README updates documenting the new optional organization_id option for both SWC and Babel plugins.
  • SWC plugin change to defer meta tag injection into document.head via setTimeout(0), reducing interference with React Portal-based libraries.
  • Babel plugin update to accept an organization_id option and thread it into window.__CODEPRESS_CONFIG__ alongside repo and branch.
  • Type definition update for CodePressPluginOptions to include the new organization_id field with helpful documentation.

Comments

  • Left one 🟡 OPTIONAL comment suggesting parity by also wiring organization_id through the SWC plugin so its window.__CODEPRESS_CONFIG__ payload matches the Babel plugin.

Assessment

  • The changes are internally consistent, backwards compatible, and improve configurability and robustness. No blocking issues found from this review.

@lightninglu10 lightninglu10 merged commit af704e2 into main Jan 9, 2026
7 checks passed
@lightninglu10 lightninglu10 deleted the metatag-sync branch January 9, 2026 06:28
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.

2 participants