docs/solutions/integration-issues/2026-04-11-slate-v2-site-should-resolve-workspace-source-with-webpack-and-pin-tsx-test-tsconfig.md
The slate-v2/site app still behaved like it depended on prebuilt package
output, which is the opposite of the apps/www workflow we actually want.
At the same time, the slate-react package tests were still drifting into the
wrong JSX runtime on one import path.
site/next.config.js fixed neither
webpack nor the test runner by itselfCan't resolve 'slate' from example pagespnpm --filter slate-react test failed in the withLinks runtime row with
React is not definedcreateElement(...) instead of fixing
the runner/config path that was wrongsite resolve workspace packages to source directly in
next.config.js.experimental.externalDir so the app can compile package source
outside site/.slate-react package test script to its package tsconfig in
packages/slate-react/package.json:"test": "TSX_DISABLE_CACHE=1 tsx --tsconfig ./tsconfig.json --test test/**/*.tsx"
That made the test runner honor the package’s own jsx: "react-jsx" setting
instead of drifting into the wrong compile behavior, and it stopped stale tsx
cache state from lying about JSX-runtime regressions.
There were two separate config bugs:
apps/www-style aliasing was copied too literally. Turbopack accepts
import-style alias targets, but webpack wants absolute paths.tsx --test runner was not reliably using the package-local tsconfig,
so one runtime test path still compiled JSX helpers the wrong way.Once the app used source aliases correctly and the test runner used the right tsconfig explicitly, the workflow stopped depending on prebuilt package output.
--tsconfig explicitly
instead of hoping the runner picks the right one