[Gradle, JS] Copy index.html from resources to dist
This commit is contained in:
+10
-1
@@ -153,7 +153,8 @@ open class KotlinBrowserJs @Inject constructor(target: KotlinJsTarget) :
|
|||||||
)
|
)
|
||||||
) {
|
) {
|
||||||
it.dependsOn(
|
it.dependsOn(
|
||||||
nodeJs.npmInstallTask
|
nodeJs.npmInstallTask,
|
||||||
|
target.project.tasks.getByName(compilation.processResourcesTaskName)
|
||||||
)
|
)
|
||||||
|
|
||||||
it.configureOptimization(kind)
|
it.configureOptimization(kind)
|
||||||
@@ -179,6 +180,14 @@ open class KotlinBrowserJs @Inject constructor(target: KotlinJsTarget) :
|
|||||||
commonWebpackConfigurations.forEach { configure ->
|
commonWebpackConfigurations.forEach { configure ->
|
||||||
it.configure()
|
it.configure()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
it.doLast { _ ->
|
||||||
|
compilation.output.resourcesDir
|
||||||
|
.copyRecursively(
|
||||||
|
target = it.destinationDirectory!!,
|
||||||
|
overwrite = true
|
||||||
|
)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (kind == BuildVariantKind.PRODUCTION) {
|
if (kind == BuildVariantKind.PRODUCTION) {
|
||||||
|
|||||||
Reference in New Issue
Block a user