docs/solutions/developer-experience/2026-03-11-next-turbopack-react-compiler-workspace-aliases.md
The docs app runs inside a pnpm workspace and consumes many local packages.
Two dev setups both break in different ways:
dist in dev with React Compiler on:
dist files already contain react-compiler-runtimeuseMemoCache size mismatchsrc aliases in tsconfig with React Compiler on:
Use a split dev/prod strategy in apps/www:
reactCompiler: falseexperimental.externalDir: trueturbopack.resolveAlias points workspace package imports to package src entrypointsapps/www/tsconfig.json boring; do not use package path remaps therereactCompiler: truedistbetter-convex keeps tsconfig local-only and lets the bundler own package resolution.Turbopack resolveAlias targets must be app-relative import paths, not absolute filesystem paths.
Absolute paths produced errors like:
Module not found: Can't resolve './Users/.../packages/core/src/index.ts'server relative imports are not implemented yetUse relative paths from apps/www, normalized to forward slashes.
next dev on http://localhost:3000 served / with 200 OKuseMemoCache overlay.next/dev/static/chunks contained packages_*_src_* chunks, proving dev now resolves package source files instead of package dist