diff --git a/packages/kit/src/runtime/client/fetcher.js b/packages/kit/src/runtime/client/fetcher.js index df709d1f3968..f86ccbe51488 100644 --- a/packages/kit/src/runtime/client/fetcher.js +++ b/packages/kit/src/runtime/client/fetcher.js @@ -86,7 +86,7 @@ export function initial_fetch(resource, opts) { return Promise.resolve(new Response(body, init)); } - return native_fetch(resource, opts); + return DEV ? native_fetch(resource, opts) : window.fetch(resource, opts); } /** @@ -112,7 +112,7 @@ export function subsequent_fetch(resource, resolved, opts) { } } - return native_fetch(resolved, opts); + return DEV ? native_fetch(resource, opts) : window.fetch(resource, opts); } /**