1/* 2 * Copyright 2016-2020 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. 3 */ 4 5project.kotlin { 6 js(LEGACY) { 7 binaries.executable() 8 browser { 9 distribution { 10 directory = new File(directory.parentFile, "dist") 11 } 12 webpackTask { 13 cssSupport.enabled = true 14 } 15 runTask { 16 cssSupport.enabled = true 17 } 18 testTask { 19 useKarma { 20 useChromeHeadless() 21 webpackConfig.cssSupport.enabled = true 22 } 23 } 24 } 25 } 26 27 sourceSets { 28 main.dependencies { 29 implementation "org.jetbrains.kotlinx:kotlinx-html-js:$html_version" 30 implementation(npm("html-webpack-plugin", "3.2.0")) 31 } 32 } 33} 34