Skip to content

Commit d803ae7

Browse files
vtempestclaude
andcommitted
fix: remove grab-url dependency from app initialization
- Removed import of init-grab from layout.tsx - Replaced init-grab.ts with empty stub (grab-url replaced with native fetch) This fixes the remaining UNLOADABLE_DEPENDENCY error in the Netlify build. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
1 parent 4dc54a6 commit d803ae7

2 files changed

Lines changed: 4 additions & 28 deletions

File tree

apps/qwksearch-web/app/layout.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ export const dynamic = 'force-dynamic';
33
import type { Metadata, Viewport } from 'next';
44
import './globals.css';
55
import 'shadcn-theme-menu/themes.css';
6-
import '@/lib/api/init-grab';
76
import { cookies } from "next/headers"
87
import { cn } from '@/lib/utils';
98
import { Toaster } from 'sonner';
Lines changed: 4 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,7 @@
11
/**
2-
* @fileoverview Initialize grab-url with default configuration.
3-
* Sets credentials: 'include' by default for all requests to ensure
4-
* authentication cookies are sent.
2+
* @fileoverview Legacy grab-url initialization stub.
3+
* This file is kept for backwards compatibility but no longer uses grab-url.
4+
* All fetch operations now use native fetch with credentials: 'include'.
55
*/
6-
import grab from 'grab-url';
76

8-
/**
9-
* Configure grab-url to include credentials by default.
10-
* This ensures session cookies are sent with all API requests.
11-
*/
12-
if (typeof window !== 'undefined') {
13-
// Set default configuration for all grab requests
14-
grab('', {
15-
setDefaults: true,
16-
credentials: 'include' as RequestCredentials,
17-
});
18-
}
19-
20-
// Type augmentation for window.grab
21-
declare global {
22-
interface Window {
23-
grab?: {
24-
defaults?: Record<string, any>;
25-
mock?: Record<string, any>;
26-
log?: any[];
27-
instance?: (defaults: Record<string, any>) => (...args: any[]) => any;
28-
};
29-
}
30-
}
7+
// Empty stub - grab-url has been replaced with native fetch

0 commit comments

Comments
 (0)