Skip to content

Commit dc45246

Browse files
authored
Revert isNode workerd detection that caused Cloudflare build regression (#16997)
1 parent ca26d0e commit dc45246

2 files changed

Lines changed: 6 additions & 3 deletions

File tree

.changeset/spicy-pandas-retire.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'astro': patch
3+
---
4+
5+
Reverts a change to `isNode` runtime detection that caused a significant build time regression for Cloudflare adapter users with large prerendered sites

packages/astro/src/runtime/server/render/util.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -275,9 +275,7 @@ export interface RendererFlusher {
275275
}
276276

277277
export const isNode =
278-
typeof process !== 'undefined' &&
279-
Object.prototype.toString.call(process) === '[object process]' &&
280-
!(typeof navigator !== 'undefined' && navigator.userAgent === 'Cloudflare-Workers');
278+
typeof process !== 'undefined' && Object.prototype.toString.call(process) === '[object process]';
281279
// @ts-expect-error: Deno is not part of the types.
282280
export const isDeno = typeof Deno !== 'undefined';
283281

0 commit comments

Comments
 (0)