function loadLaunchDarklyModule
Since 0.2.0
loadLaunchDarklyModule(): Promise<ILaunchDarklyModule>

Lazily imports the LaunchDarkly Node server SDK.

This performs a real import('npm:@launchdarkly/node-server-sdk@^9') — the package is resolved by the runtime at call time and is not part of this package's dependency graph. The SDK is Node-oriented (it uses node:events and Node HTTP), so it works on Node, Deno, and Bun but not on Cloudflare Workers.

Return Type

The adapted module facade

Throws

LaunchDarklyModuleError

When the package is not installed, or when what it resolves to does not expose init()

Usage

import { loadLaunchDarklyModule } from "feature-flags-plugin/src/index.ts";