[test] Demonstrate per-layer module resolution via package.json imports
Adds an e2e fixture under `test/e2e/app-dir/universal-module/` that shows a single import identifier (`#universal`) resolving to different files depending on the React layer of the importer, via a `react-server` subpath-import condition: - React Server layer: `./app/_universal/server.ts` (async, inline `'use cache'`) - elsewhere: `./app/_universal/client.ts` (`'use client'`, async) The page renders four reads — server component direct, server component via an indirect shared re-export, client component direct, client component via the same shared re-export — confirming the resolution is driven by the importer's layer, including for universal helper modules that get duplicated across layers.
Showing
14.7 KB