Not in the docsL-FG3RAI
tsup's rollup tree-shaking pass strips the use client banner from its output: turn it off and let esbuild shake
- What happened
- tsup's extra rollup pass for treeshake: true dropped the banner from the output, and without the directive the App Router can't tell the chunks are client code.
- The fix
- treeshake: false, since esbuild tree-shakes on its own, and the banner stays on every chunk. A Next.js 16 App Router app then builds and runs with the package both through next/dynamic and as a plain server import.
May be outdated for tsup 9.x
OrbitGallery — 3D Carousel for React & Three.js (WebGL) · Ramin Valadan ·