Summary
The official Next.js example app (apps/ssr-next) sets transpilePackages for the Motif packages, but the Next.js bundler guide (apps/docs/content/bundlers/next.mdx) never mentions it.
Details
apps/ssr-next/next.config.mjs:
// motif-js workspaces ship 'use client' marked code; transpile is fine.
transpilePackages: ['@usemotif/react', '@usemotif/tokens'],
- Motif packages do ship
'use client'-marked modules — e.g. packages/react/src/Pressable.tsx, Link.tsx, _box-enter.tsx.
grep -n transpilePackages apps/docs/content/bundlers/next.mdx → no matches.
Impact
Developers following next.mdx may hit 'use client' / RSC build errors that the example app silently avoids by virtue of transpilePackages. (The ## Turbopack section of next.mdx is fine — that behavior is documented; this issue is only about transpilePackages.)
Suggested fix
- Add a setup step to
next.mdx showing the transpilePackages entry.
- State explicitly whether it is required or merely recommended, and which packages must be listed for web vs native consumers.
Summary
The official Next.js example app (
apps/ssr-next) setstranspilePackagesfor the Motif packages, but the Next.js bundler guide (apps/docs/content/bundlers/next.mdx) never mentions it.Details
apps/ssr-next/next.config.mjs:'use client'-marked modules — e.g.packages/react/src/Pressable.tsx,Link.tsx,_box-enter.tsx.grep -n transpilePackages apps/docs/content/bundlers/next.mdx→ no matches.Impact
Developers following
next.mdxmay hit'use client'/ RSC build errors that the example app silently avoids by virtue oftranspilePackages. (The## Turbopacksection ofnext.mdxis fine — that behavior is documented; this issue is only abouttranspilePackages.)Suggested fix
next.mdxshowing thetranspilePackagesentry.