I'd like to get us onto IR soon so we can start gi...
# javascript
a
I'd like to get us onto IR soon so we can start giving more feedback, but our JS webapp relies on a separate file per module so it can serve each module only where it's needed. I saw that KT-38136 is marked as fixed in 1.4.20, so I'm digging back into things, but I can't find info on how to get separate files per-module working 😔 In
LEGACY
, I was able to: • create an umbrella module with dependencies on other modules, kotlin stdlib, and even serialization (these other modules also have their own interdependencies) • configure
browser.dceTask.dceOptions.outputDirectory
to point to a specific folder • run
processDceKotlinJs
• check that specified directory for a separate, DCEd JS file for every dependency of the umbrella module (including a DCEd version of kotlin stdlib and serialization!) What I've done so far in `IR`: • added
binaries.executable()
to my umbrella module's JS config (and tried adding it to every dependency module) • tagged whatever was previously relying on
dceOptions.keep
with
@JsExport
• tried updating
browser.distribution.directory
to match
dceOptions.outputDirectory
• ran
browserDistribution
(since
processDceKotlinJs
is missing) I do get a single file for my umbrella repo that seems to include all of annotated contents of its dependencies I still can't seem to get separate, DCEd JS file per module/dependency though. Anyone else run into this or have any tips?
b
There's a new dsl for that in kotlin.js(IR). binaries.library()
But note that there’s this bug: https://youtrack.jetbrains.com/issue/KT-43572