Variables
pyricEsbuildExternals
const pyricEsbuildExternals: readonly string[];
Wildcard string patterns matching Firebase packages for bundlers that require string arrays with glob wildcards (esbuild, tsup).
pyricExternalPackages
const pyricExternalPackages: readonly string[];
The package names, for configuration that takes names rather than patterns,
such as Vite’s ssr.external. The @firebase scope has no single name, so
it is not here. A bundler that keeps firebase external leaves the SDK’s own
@firebase/* imports to Node, but an app’s direct @firebase/* import, or
an npm alias of a Firebase SDK, is bundled unless listed by name.
installedFirebaseSdkNames adds those from what is installed, for
withPyric (#1626) and pyricViteExternals (#1756).
pyricExternals
const pyricExternals: Readonly<{
esbuild: readonly string[];
rolldown: readonly RegExp[];
rollup: readonly RegExp[];
tsup: readonly string[];
vite: readonly RegExp[];
webpack: readonly RegExp[];
}>;
Convenience presets mapping bundler names to their supported external pattern format.
pyricRollupExternals
const pyricRollupExternals: readonly RegExp[];
RegExp patterns matching Firebase packages for bundlers that accept RegExp in their external configuration (Rolldown, Rollup, Vite, Webpack).
Functions
isPyricExternal()
function isPyricExternal(id: string): boolean;
Universal predicate returning true if a module specifier belongs to Firebase or Firebase Admin SDK surfaces intercepted by Pyric.
Compatible with bundlers that accept a function in their external setting (Rolldown, Rollup, Vite, Webpack).
Parameters
| Parameter | Type |
|---|---|
id | string |
Returns
boolean
pyricViteExternals()
function pyricViteExternals(): Plugin;
A Vite plugin that keeps every Firebase SDK external in SSR output. It adds
installedFirebaseSdkNames from the Vite root to ssr.external,
which Vite applies to SSR builds only and ranks above ssr.noExternal, so
a server bundled with noExternal: true still imports firebase,
firebase-admin, a direct @firebase/* import and an npm alias of either
at runtime, where the register sees them (#1756). Vite matches the list by
the name an import names, so an alias is listed by its own name. Client
builds are unaffected, and the plugin does not run in the dev server. A
config with ssr.external: true already externalizes every dependency, so
the plugin leaves it alone.
Returns
Plugin