Skip to content

Commit 5fc3032

Browse files
committed
fix: handle both CJS and ESM module resolution for @lwrjs/api
1 parent 0ef399a commit 5fc3032

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

src/lwrjs-api.d.ts

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,23 @@ declare module '@lwrjs/api' {
1818
siteDir: string;
1919
}
2020

21+
export function expDev(options: SitesLocalDevOptions): Promise<void>;
22+
export function setupDev(options: SitesLocalDevOptions): Promise<void>;
23+
}
24+
25+
// Handle CJS module resolution
26+
declare module '@lwrjs/api/build/cjs/index.cjs' {
27+
export interface SitesLocalDevOptions {
28+
sfCLI: boolean;
29+
authToken: string;
30+
open: boolean;
31+
port: number;
32+
logLevel: string;
33+
mode: string;
34+
siteZip?: string;
35+
siteDir: string;
36+
}
37+
2138
export function expDev(options: SitesLocalDevOptions): Promise<void>;
2239
export function setupDev(options: SitesLocalDevOptions): Promise<void>;
2340
}

0 commit comments

Comments
 (0)