root/build.gradle.kts ```rootProject.plugins.withT...
# javascript
h
root/build.gradle.kts
Copy code
rootProject.plugins.withType<NodeJsRootPlugin> {
    rootProject.the<NodeJsRootExtension>().npmInstallTaskProvider.configure{
        inputs.files("package.json", "yarn.lock")
        outputs.dir("node_modules")
    }
}
rootProject.plugins.withType<YarnPlugin>{
    rootProject.the<YarnRootExtension>().yarnLockMismatchReport = YarnLockMismatchReport.NONE
    rootProject.the<YarnRootExtension>().reportNewYarnLock = false
    rootProject.the<YarnRootExtension>().yarnLockAutoReplace = false
}
After this setting, the build time for KotlinJS has dramatically decreased. Especially, the configuration of npmInstallTaskProvider was effective.
c
Thanks for letting us know! 😅
I would just make the yarn root extension configuration more inline by accessing it once and configuring it in a configuration call.
a
@Ilya Goncharov [JB] ^^ Seems like it could also be helpful both for Kotlin/JS and Kotlin/Wasm