Skip to content

fix: Next.js esm and cjs issues with SSR #2491

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 19 commits into from
Feb 3, 2025

Conversation

KevinGhadyani-Okta
Copy link
Contributor

@KevinGhadyani-Okta KevinGhadyani-Okta commented Feb 3, 2025

OKTA-858688

Summary

Inbox team uses Next.js, and you can't disable SSR. We found a workaround with dynamic imports, but we wanted a real fix as this also affects Workflows team.

To fix that issue, Odyssey needs to build in a way that's Node.js-friendly. It also needed to keep the existing functionality working with ESM exports and have it not error with SSR.

Part of the work was originally done by @benschell-okta to adjust output file extensions and adding a CJS build.

The work I did fixes the import/require resolutions and SSR issues.

Testing & Screenshots

  • I have confirmed this change with my designer and the Odyssey Design Team.

N/A

@KevinGhadyani-Okta KevinGhadyani-Okta requested a review from a team as a code owner February 3, 2025 17:40
It's causing timing issues
@oktapp-aperture-okta oktapp-aperture-okta bot merged commit 8f0ac43 into main Feb 3, 2025
1 check passed
@oktapp-aperture-okta oktapp-aperture-okta bot deleted the kg_fix-inbox-esm_OKTA-858688 branch February 3, 2025 19: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.

3 participants