When I add an NPM dependency to a project like this, I assume that the dependency must somehow be fetched from the NPM repository:
kotlin {
sourceSets {
getByName("jsMain") {
dependencies {
implementation(npm("my-npm-package", "1.0.0"))
}
}
}
}
However, when I inspect the project’s repositories like this, the NPM repository is not present, only the repositories I have configured explicitly myself:
tasks.create("printRepositories") {
dependsOn("build")
group = "debugging"
doLast {
println("Repositories:")
project.repositories.forEach {
println("- ${it.name} (${it.javaClass.simpleName})")
}
}
}
Why?