When building my project using the browserDistribution Gradle task, Kotlin/JS puts the output which has been processed by webpack into /build/distributions/myProject.js.
Instead, I would like my output to go into a folder called /output in my project's root directory.
How can I change the path where my distributions are put after running through webpack?
I'm using the Gradle Kotlin DSL if that helps.
The Kotlin/JS Gradle plugin provides a
distributionAPI which can be used to adjust the output directory of a project. To put the final distribution output of a project into a folder calledoutputin the project root, one can use the following snippet (it works in both Gradle Kotlin DSL and Groovy Gradle):