Skip to content

Commit a0cec9d

Browse files
ovflowdclaude
andcommitted
fix(cloudflare): repair paths after platforms/cloudflare flatten
worker-entrypoint.ts moved from src/ to the package root in the previous commit but the relative imports of the OpenNext-built worker still pointed at `../../../apps/site/.open-next/worker.js`, one segment too deep. wrangler dev (used by Playwright via cloudflare:preview) re-bundles the entrypoint and surfaced the regression — `opennextjs-cloudflare build` had silently tolerated it. Adjust both imports to `../../apps/site/.open-next/worker.js`. While here, update the cloudflare#cloudflare:build:worker turbo inputs glob from `src/**/*.ts` to `*.ts` so the cache key tracks the now-flat package. Also drop a duplicate `apps/site/redirects.json @nodejs/web-infra` line from CODEOWNERS that crept in when the platform entries were inserted between the original and a stray copy. Co-Authored-By: Claude Opus 4.7 <[email protected]>
1 parent d0d3a18 commit a0cec9d

3 files changed

Lines changed: 3 additions & 4 deletions

File tree

.github/CODEOWNERS

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@ platforms/cloudflare/open-next.config.ts @nodejs/web-infra
3232
platforms/cloudflare/next.platform.config.mjs @nodejs/web-infra
3333
platforms/vercel/vercel.json @nodejs/web-infra
3434
platforms/vercel/next.platform.config.mjs @nodejs/web-infra
35-
apps/site/redirects.json @nodejs/web-infra
3635

3736
# Critical Documents
3837
LICENSE @nodejs/tsc

platforms/cloudflare/turbo.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"inputs": [
88
"open-next.config.ts",
99
"wrangler.jsonc",
10-
"src/**/*.ts",
10+
"*.ts",
1111
"../../apps/site/{app,components,hooks,i18n,layouts,middlewares,pages,providers,types,util}/**/*.{ts,tsx}",
1212
"../../apps/site/{app,components,layouts,pages,styles}/**/*.css",
1313
"../../apps/site/{next-data,scripts,i18n}/**/*.{mjs,json}",

platforms/cloudflare/worker-entrypoint.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import type {
1111
Request,
1212
} from '@cloudflare/workers-types';
1313

14-
import { default as handler } from '../../../apps/site/.open-next/worker.js';
14+
import { default as handler } from '../../apps/site/.open-next/worker.js';
1515

1616
export default withSentry(
1717
(env: {
@@ -50,4 +50,4 @@ export default withSentry(
5050
}
5151
);
5252

53-
export { DOQueueHandler } from '../../../apps/site/.open-next/worker.js';
53+
export { DOQueueHandler } from '../../apps/site/.open-next/worker.js';

0 commit comments

Comments
 (0)