KotlinJS package.json customisation

I working on program for NodeJS (Gradle + KotlinJS + kotlin.target,nodejs), and want to add some custom fields to “package.json” file. Is the way to do that, for example in build.gradle.kts? And how I can add “devDependency” in Gradle (e.g. modules with Typescript types)

@rusnasonov Hi!

  1. Unfortunately, you can’t customize package.json, see https://youtrack.jetbrains.com/issue/KT-35330

  2. In 1.4 we’re planning to add a possibility to add devDependencies: -https://youtrack.jetbrains.com/issue/KT-32531
    You can use a WA for build.gradle.kts:

kotlin.target {

    nodejs {

        val main by compilations.getting {
            packageJson {
                devDependencies += arrayOf(
                    "css-loader" to "3.2.0",
                    "mini-css-extract-plugin" to "0.8.0",