fix(shared): drop .js extensions from relative imports for Metro
packages/shared/src/index.ts and all sub-modules used .js extensions on relative imports (e.g. './admin/index.js') pointing at .ts source files. TypeScript with moduleResolution: "Bundler" doesn't need them, and Metro's eager exporter (used for preview / production builds) reads them literally and fails — only the dev-server Metro fell back to .ts. Workspace typecheck remains 8/8 green; Vite and TS Bundler resolution already accept both styles, so desktop is unaffected.
This commit is contained in:
@@ -1,11 +1,11 @@
|
||||
import { createClient as createSupabaseClient, type SupabaseClient } from '@supabase/supabase-js';
|
||||
import { createClient as createSupabaseClient, type SupabaseClient } from '@supabase/supabase-js';
|
||||
|
||||
import type { Database, SupabaseConfig } from './types.js';
|
||||
import type { Database, SupabaseConfig } from './types';
|
||||
|
||||
// Typed client alias used throughout the app.
|
||||
export type AppSupabaseClient = SupabaseClient<Database>;
|
||||
|
||||
// Inline serial lock — replaces Supabase's default `navigator.locks` based
|
||||
// Inline serial lock — replaces Supabase's default `navigator.locks` based
|
||||
// lock that occasionally throws "Lock was stolen by another request" when
|
||||
// the same origin opens multiple tabs / Tauri windows / HMR-reloaded
|
||||
// modules. We only have one client instance per process so a simple promise
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
export * from './bytea.js';
|
||||
export * from './client.js';
|
||||
export * from './types.js';
|
||||
export * from './bytea';
|
||||
export * from './client';
|
||||
export * from './types';
|
||||
|
||||
Reference in New Issue
Block a user