importOptionalPeer<Module>
Imports an optional peer dependency from the project’s own node_modules.
Resolved from the project rather than from the toolkit, so a package manager that does not hoist still finds what the project installed.
Import:
import { importOptionalPeer } from '@mnaoumov/obsidian-dev-toolkit/bundlers/obsidian-plugin-features';Signature:
function importOptionalPeer(params: ImportOptionalPeerParams): Promise<Module>Parameters:
| Parameter | Type | Description |
|---|---|---|
params |
ImportOptionalPeerParams | The ImportOptionalPeerParams. |
Returns: Promise<Module> — A Promise that resolves to the module namespace.
Links to this page: