optional Npm
Deprecated
Deprecated in favor of npmOptional
Replace with
npmOptional(name, version) /* must not be passed to the implementation(...) or api(...) calls */Deprecated - wrapping npm dependencies in implementation(optionalNpm(...)) is deprecated. Declare them with npmOptional instead, as a standalone statement:
kotlin.sourceSets["jsMain"].dependencies {
npmOptional("is-odd-even", "^1.1.0")
}Scheduled for removal in Kotlin 2.7.
Parameters
The NPM dependency name
The NPM dependency version
Deprecated
Deprecated in favor of npmOptional
Replace with
npmOptional(name, directory) /* must not be passed to the implementation(...) or api(...) calls */Deprecated - wrapping npm dependencies in implementation(optionalNpm(...)) is deprecated. Declare them with npmOptional instead, as a standalone statement:
kotlin.sourceSets["jsMain"].dependencies {
npmOptional("is-odd-even", project.file("npm/is-odd-even"))
}Scheduled for removal in Kotlin 2.7.
Parameters
The NPM dependency name
The directory where dependency files are located (See NPM directory keyword)
Deprecated
Deprecated in favor of npmOptional
Replace with
npmOptional("dependency-name", directory) /* must not be passed to the implementation(...) or api(...) calls */Deprecated - wrapping npm dependencies in implementation(optionalNpm(...)) is deprecated. Declare them with npmOptional instead, as a standalone statement with an explicit dependency name:
kotlin.sourceSets["jsMain"].dependencies {
npmOptional("is-odd-even", project.file("npm/is-odd-even"))
}Scheduled for removal in Kotlin 2.7.
Parameters
The directory where dependency files are located (See NPM directory keyword)