Repository navigation
Conversation
@skillsoft/gamut ships strict-ESM .mjs. With experimental.esmExternals off, Next require()s server externals and default imports from @emotion/styled and react-select break while it collects page data. next-config is report-only: dropping the flag can take other config with it, so it warns and adds a checklist item instead of rewriting. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Oct 20, 2026
…migrations Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
# Conflicts: # packages/gamut-codemods/src/presets/scope-swap/index.ts
dreamwasp
marked this pull request as ready for review
October 20, 2026 16:56
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Overview
Breaking change: Next.js apps that set
experimental.esmExternals: falsecan fail to build or prerender on@skillsoft/gamut. Gamut ships strict-ESM.mjs. With that flag, Nextrequire()s server externals, so default imports from@emotion/styledandreact-selectget a module object. The result isstyled(...) is not a functionorElement type is invalidwhile Next collects page data.Stack (split from #28, merge in order):
mainmainnext-configis report only. It warns aboutesmExternals: falseinnext.config.*and adds a checklist item to remove it, along with any@emotion/*aliases ortranspilePackagesentries that were working around it.NEXT_EMOTION_INTEROP.md) ships with the agent skill PR.PR Checklist
Testing Instructions
yarn nx test gamut-codemods. Expect 68 tests to pass.Build and run on a throwaway repo:
Expect a
[next-config]warning fornext.config.jsand the "Some next.config files set..." next step.next.config.jsitself is unchanged.PR Links and Envs
🤖 Generated with Claude Code