Until now, to build to production, I used the `:js...
# javascript
c
Until now, to build to production, I used the
:jsBrowserProductionWebpack
task then got the files in
build/dist/js/productionExecutable/
. However, since 2.0.0, this is not generated anymore. Instead, I found
build/kotlin-webpack/js/productionExecutable
, but that doesn't contain the
index.html
file. What changed? Where are the files generated now? Gradle setup:
Copy code
kotlin {
	js(IR) {
		browser()

		binaries.executable()
	}

	val jsMain by sourceSets.getting {
		dependencies {
			implementation(projects.lazyLayouts)
		}
	}
}
There is no webpack.config.d folder or any other webpack-related config.
c
Thanks. That's… terse, though. Does this mean I should use the
distribution
task?
j
Yep. And it will put things into a new directory. I forget which as I'm not at a computer, but it will be obvious
c
Ok, the task it actually called
jsBrowserDistribution
, correct?
And it generates everything into
build/dist/js/productionExecutable/
, perfect, thanks
https://kotlinlang.org/docs/js-project-setup.html#webpack-bundling should be updated, then. Should I create a YouTrack issue for it, or is there a better place?
o
I guess YT is always a viable option. But you could just do a PR on https://github.com/JetBrains/kotlin-web-site (also available directly from the docs via edit page).