Does anyone have a solution to compiling multiple .kt files into separate independent .js files, instead of the default where multiple .kt files are compiled into one single .js file?
g
gaetan
02/09/2018, 12:24 PM
Why would you need that?
f
Femi Sotonwa
02/09/2018, 12:29 PM
I'm working on some html pages (without the kotlinx.html lib), and I want each page to have a separate .kt(compiled to .js) file.
t
Tristan Caron
02/09/2018, 12:54 PM
No there is no easy way for the moment. If I remember well, their are workin on it (https://discuss.kotlinlang.org/t/kotlin-js-file-size/2501/2). It's also useful when you want to load on need the modules, or just updating some part of your code (the browser doesn't need to download everything again)
m
mmaillot
02/09/2018, 2:24 PM
If you create one gradle module per output and put shared code with a module dependency?