has anyone used requirejs optimizer `r.js` to bund...
# javascript
n
has anyone used requirejs optimizer
r.js
to bundle the kotlinjs output into a single file ? ideally without the need to setup node or npm in the project
u
any reason behind choosing r.js instead of webpack?
n
i am not sure, can webpack compress it all into a single file without any need for amd module loaders ?
if so.. got any sample project with that setup in gradle(.kts) ?
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
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
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.