diff --git a/build.gradle.kts b/build.gradle.kts index a6d43ef..0db977e 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -14,6 +14,8 @@ dependencies { implementation("org.jetbrains.kotlinx:kotlinx-html:0.7.3") } +val outputDirectory = file("$rootDir/compiledOutput") + kotlin { js(IR) { moduleName = "Username404_Website" @@ -34,6 +36,7 @@ kotlin { } browser { webpackTask { + destinationDirectory = outputDirectory output.libraryTarget = "global" cssSupport.enabled = true } @@ -52,3 +55,10 @@ kotlin { binaries.executable() } } + +tasks { + clean.get().delete.add(outputDirectory) + withType(ProcessResources::class) { + destinationDir = outputDirectory + } +}