Navigate

API reference

@pyric/cli/bundler

6 published symbols from @pyric/cli

Generated from the TypeScript declarations shipped at this import path.

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, and needs none: its packages are dependencies of firebase, and a bundler that keeps firebase external leaves those imports to Node as well.


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

ParameterType
idstring

Returns

boolean


pyricViteExternals()

function pyricViteExternals(): Plugin;

A Vite plugin that keeps firebase and firebase-admin external in SSR output. It adds pyricExternalPackages 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 at runtime. 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