Skip to content

getCssModuleCode

Builds the JavaScript module a CSS module’s import resolves to: its scoped class names, by their original ones, as the default export.

Import:

import { getCssModuleCode } from '@mnaoumov/obsidian-dev-toolkit/bundlers/obsidian-plugin-transforms';

Signature:

function getCssModuleCode(moduleExports: Readonly<Record<string, string>>): string

Parameters:

Parameter Type Description
moduleExports Readonly<Record<string, string>> The scoped class names.

Returns: string — The module’s code.