You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
refactor(platform): flatten platform packages and route via #platform
Collapse platforms/{vercel,cloudflare}/src/ into the package roots so
analytics, instrumentation, image-loader, and the worker entrypoint
sit at the package root. Both packages now expose a single flat
exports map (`./*: ./*`); platform-cloudflare no longer needs an
explicit `./image-loader` entry because the consumer
(next.platform.config.mjs) calls `require.resolve(...image-loader.ts)`
with the extension.
Move apps/site/{next,playwright}.platform.config.mjs into
apps/site/platform/ and update the apps/site `#platform/*` imports
default branch to a single literal path (`./platform/*`). Import
sites carry explicit extensions so Node resolves them without
extension fallback: `#platform/next.platform.config.mjs`,
`#platform/playwright.platform.config.mjs`.
Update platforms/cloudflare/wrangler.jsonc `main` to the flattened
worker path, and align both platform tsconfigs on
`include: ["**/*.ts","**/*.tsx","**/*.mjs"]` now that there is no
`src/` to scope to.
Also: factor DEPLOY_TARGET out of next.constants.mjs into a small
next.platform.constants.mjs (avoids dragging client-side env into
build-time config), simplify transpilePackages derivation, drop the
playwright.config.d.ts `Pick<Config, ...>` (resolves `use` to `{}`)
in favor of `PlaywrightTestConfig`, and refresh docs/technologies.md.
Verified: standalone build, Vercel build (`NEXT_PUBLIC_DEPLOY_TARGET=
vercel --conditions=vercel`), Cloudflare worker build, and
`playwright --list` (18 tests) all green.
Co-Authored-By: Claude Opus 4.7 <[email protected]>
0 commit comments