Next.js Discord

Discord Forum

Disable transpiling of packages in workspace/monorepo

Unanswered
MattIPv4 posted this in #help-forum
Open in Discord
👋 It seems that Next.js is transpiling code of other packages in an NPM workspace/monorepo if they're used in the website. How can I turn off this behaviour, so other packages from that workspace that're installed in the Next.js website are treated as externals properly?

https://codesandbox.io/p/sandbox/silent-violet-5yzkcy contains a demonstration of why this causes problems.

1 Reply

Filed https://github.com/vercel/next.js/issues/57179, this feels like very odd behaviour to me