Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,12 @@ console.log(`ReactFire v${version}`);

const externals = [
'react',
// Externalize the useSyncExternalStore shim so the consumer's bundler resolves it.
// Bundling this CJS module into the ESM output makes rolldown emit a dynamic require()
// that throws ("dynamic usage of require is not supported") when a reactfire data hook
// loads client-side in a Next.js App Router (strict ESM) context. Externalizing keeps
// the shim's React 16/17 fallback intact while removing the require from our dist.
'use-sync-external-store/shim',
'firebase',
'firebase/app',
'firebase/firestore',
Expand Down
Loading