peerNpm

abstract fun peerNpm(name: String, version: String): Dependency

Creates a dependency to a NPM module that is added to peerDependencies.

Note: The created dependency should be manually added to this entity using other methods from this DSL:

kotlin.sourceSets["jsMain"].dependencies {
implementation(peerNpm("is-odd-even", "1.0.0"))
}

This is only relevant for Kotlin entities that target only KotlinPlatformType.js or KotlinPlatformType.wasm.

Parameters

name

The NPM dependency name

version

The NPM dependency version