Skip to content

Fix for turbopack coming from a shared cjs package#52

Closed
tzjames wants to merge 4 commits intotobilg:mainfrom
tzjames:ji/fix_browser_build
Closed

Fix for turbopack coming from a shared cjs package#52
tzjames wants to merge 4 commits intotobilg:mainfrom
tzjames:ji/fix_browser_build

Conversation

@tzjames
Copy link
Contributor

@tzjames tzjames commented Mar 3, 2026

This is a follow on to #44. It includes a test playground the fails to load correctly.

@tobilg
Copy link
Owner

tobilg commented Mar 3, 2026

Sorry, but again, I will not merge this. Please refrain from opening more of such PRs.

It works with Vite and WebPack for me.

Check if the following works eventually:

Workaround for problematic ESM-only packages: You can externalize them using serverExternalPackages in next.config.js, or use dynamic import() instead of static imports to defer loading. For packages that are ESM-only and cause issues, adding them to serverExternalPackages is the recommended fix.

@tobilg tobilg closed this Mar 3, 2026
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