Tomasz Krakowiak
12/19/2021, 3:21 AMBig Chungus
12/19/2021, 10:38 AMTomasz Krakowiak
12/19/2021, 10:44 AMBig Chungus
12/19/2021, 10:46 AMTomasz Krakowiak
12/19/2021, 10:46 AMjs("node", IR) {
nodejs { }
compilations["main"].defaultSourceSet.dependsOn(js(IR).compilations["main"].defaultSourceSet)
configurations.all { if(name == compilations["main"].apiConfigurationName + "Elements") attributes.attribute(jsPlatformType, "node") }
configurations.all { if(name == "nodeRuntimeElements") attributes.attribute(jsPlatformType, "node") }
binaries.executable()
}
Tomasz Krakowiak
12/19/2021, 10:46 AMBig Chungus
12/19/2021, 10:48 AMBig Chungus
12/19/2021, 10:49 AMTomasz Krakowiak
12/19/2021, 10:50 AMjs("browser", IR)
which has explicit webpackTaskTomasz Krakowiak
12/19/2021, 10:50 AMjs("browser", IR) {
browser {
commonWebpackConfig {
cssSupport.enabled = true
}
runTask {
devServer = KotlinWebpackConfig.DevServer(
port = 3001,
open = false,
static = mutableListOf(
project.projectDir.absolutePath + "/src/jsMain/resources",
),
proxy = mutableMapOf(
"/" to mapOf("target" to "<http://localhost:3000>", "ws" to true),
)
)
outputFileName = "main.js"
}
webpackTask {
sourceMaps = true
destinationDirectory = project.buildDir.resolve("distributions/js")
outputFileName = "main.js"
}
}
compilations["main"].defaultSourceSet.dependsOn(js(IR).compilations["main"].defaultSourceSet)
configurations.all { if(name == compilations["main"].apiConfigurationName + "Elements") attributes.attribute(jsPlatformType, "browser") }
configurations.all { if(name == "browserRuntimeElements") attributes.attribute(jsPlatformType, "browser") }
binaries.executable()
}
Big Chungus
12/19/2021, 10:52 AMBig Chungus
12/19/2021, 10:52 AMBig Chungus
12/19/2021, 10:53 AMBig Chungus
12/19/2021, 10:54 AMTomasz Krakowiak
12/19/2021, 10:55 AMTomasz Krakowiak
12/19/2021, 10:57 AMBig Chungus
12/19/2021, 10:57 AMBig Chungus
12/19/2021, 10:57 AMTomasz Krakowiak
12/19/2021, 11:00 AMBig Chungus
12/19/2021, 11:04 AMTomasz Krakowiak
12/19/2021, 11:07 AMBig Chungus
12/19/2021, 3:00 PMTomasz Krakowiak
12/19/2021, 3:02 PMTomasz Krakowiak
12/19/2021, 5:04 PMBig Chungus
12/19/2021, 5:10 PMBig Chungus
12/19/2021, 5:10 PMBig Chungus
12/19/2021, 5:24 PMBig Chungus
12/19/2021, 5:24 PMTomasz Krakowiak
12/19/2021, 5:25 PM> Cannot resolve project dependency project ':package' -> project ':app'.Dependency to project with multiple js compilation not supported yet.
I guess I'll have to write my own packaging.Big Chungus
12/19/2021, 5:26 PMBig Chungus
12/19/2021, 5:26 PMBig Chungus
12/19/2021, 5:27 PMTomasz Krakowiak
12/19/2021, 5:30 PMTomasz Krakowiak
12/19/2021, 5:37 PMBig Chungus
12/19/2021, 5:39 PMBig Chungus
12/19/2021, 5:40 PMBig Chungus
12/19/2021, 5:40 PMTomasz Krakowiak
12/19/2021, 5:45 PMBig Chungus
12/19/2021, 5:47 PMBig Chungus
12/19/2021, 5:47 PMTomasz Krakowiak
12/19/2021, 5:51 PMBig Chungus
12/19/2021, 5:52 PMBig Chungus
12/19/2021, 5:53 PMBig Chungus
12/19/2021, 5:53 PMTomasz Krakowiak
12/19/2021, 5:53 PM