i’m trying to convert build.gradle file with set u...
# gradle
o
i’m trying to convert build.gradle file with set up
org.jetbrains.kotlin.frontend
plugin and
webPack
like this:
Copy code
kotlinFrontend {
    npm {
        dependency("firebase")
    }

    webpackBundle {
        bundleName = "main"
        contentPath = file("src/jsMain/web")
    }
}

/**
 * Retrieves the [webpackBundle][org.jetbrains.kotlin.gradle.frontend.webpack.WebPackExtension] project extension.
 */
val Project.`webpackBundle`: org.jetbrains.kotlin.gradle.frontend.webpack.WebPackExtension get() =
    extensions.getByName("webpackBundle") as org.jetbrains.kotlin.gradle.frontend.webpack.WebPackExtension

/**
 * Configures the [webpackBundle][org.jetbrains.kotlin.gradle.frontend.webpack.WebPackExtension] project extension.
 */
fun Project.`webpackBundle`(configure: org.jetbrains.kotlin.gradle.frontend.webpack.WebPackExtension.() -> Unit): Unit =
    extensions.configure("webpackBundle", configure)
But it fails with this erro message:
Copy code
org.gradle.api.ProjectConfigurationException: A problem occurred configuring project ':app'
...
Caused by: java.lang.NullPointerException
	at org.gradle.api.internal.plugins.ExtensionsStorage.configureExtension(ExtensionsStorage.java:67)
	at org.gradle.api.internal.plugins.DefaultConvention.configure(DefaultConvention.java:222)
	at Build_gradle.webpackBundle(Unknown Source)
	at Build_gradle$4.invoke(build.gradle.kts:135)
	at Build_gradle$4.invoke(build.gradle.kts:1)
```