mergeCssAssets
Decides how the CSS a bundler emitted becomes the one styles.css Obsidian loads.
Obsidian reads a plugin’s stylesheet from styles.css and nothing else, while a bundler names the CSS after the entry (main.css), after the package, or with a content hash. A lone CSS file is renamed; when there are several, they are concatenated in the order given.
Import:
import { mergeCssAssets } from '@mnaoumov/obsidian-dev-toolkit/bundlers/obsidian-plugin-build';Signature:
function mergeCssAssets(cssAssets: readonly CssAsset[]): MergeCssAssetsResultParameters:
| Parameter | Type | Description |
|---|---|---|
cssAssets |
readonly CssAsset[] | The CSS files the bundler emitted, in output order. |
Returns: MergeCssAssetsResult — What to write as styles.css and which emitted files to drop.
Links to this page: