Skip to content

Commit bae9ce9

Browse files
committed
Fix for the Firestore global variable
1 parent 4186359 commit bae9ce9

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/frameworks/index.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,8 @@ export const injectConfig = async (dist: string, framework: string, options: any
4444
if (ssr) configScript += 'window.__FRAMEWORKS_SYNC_CLIENT_AUTH__=true;';
4545
emulators.forEach(({port, host, name}) => {
4646
configScript += `window.__${name.toUpperCase()}_EMULATOR_HOST__="${host}:${port}";`;
47+
// I don't know what this is about, seems Firestore is mangling symbols... why they'd do that for globals I do not know
48+
if (name === 'firestore') configScript += `window.__PRIVATE____FIRESTORE_EMULATOR_HOST__="${host}:${port}";`;
4749
});
4850
// TODO this is very fragile, how can we make this better?
4951
// webpack plugin? this is only needed for client side

0 commit comments

Comments
 (0)