to bundle the kotlinjs output into a single file ?
ideally without the need to setup node or npm in the project
u
[JB] Shagen
11/05/2019, 11:18 AM
any reason behind choosing r.js instead of webpack?
n
Nikky
11/05/2019, 11:48 AM
i am not sure, can webpack compress it all into a single file without any need for amd module loaders ?
Nikky
11/05/2019, 11:48 AM
if so.. got any sample project with that setup in gradle(.kts) ?
Nikky
11/05/2019, 11:54 AM
and i guess i would like to not have to setup a npm projet and run npm webpack, thats why i am looking for a solution that works via commandline
so i can just make a gradle
exec {}
with the kotlinjs output passed to that cli program
n
Nicholas Bilyk
11/27/2019, 2:27 AM
NikkyAi, yes, it can compress it into a single file.
Yes, it can be without amd module loaders -- Choose UMD or Plain.
Kotlin really needs better examples of webpack and npm. The best I've found is here:
https://github.com/avdim/kotlin-mpp-js-browser
And here is the youtrack ticket for JetBrain's progress on documentation:
https://youtrack.jetbrains.com/issue/KT-32137
Nicholas Bilyk
11/27/2019, 2:29 AM
And I should mention that if you get it working it doesn't require a separate setup of node, it works through Gradle (and therefore command line) which handles node.