Skip to content

Config: catalogMatchesSource

Functions, types, and exports for Config: catalogMatchesSource.

Page outline

Whether a source file belongs to a configured catalog.

This is shared by the Vite and Next integrations. Dot-prefixed source path segments intentionally match, matching Vite's historic filter behavior.

import { catalogMatchesSource } from "@palamedes/config"

catalogMatchesSource(config: Pick<LoadedPalamedesConfig, "rootDir">, catalog: PalamedesCatalogConfig, sourcePath: string): boolean

Parameters

NameTypeRequired
configPick<LoadedPalamedesConfig, "rootDir">Yes
catalogPalamedesCatalogConfigYes
sourcePathstringYes

Returns

boolean

Source entry on GitHub

Last updated: November 1, 2026