Hi, I am trying to bundle `moment.js` into my jar ...
# multiplatform
g
Hi, I am trying to bundle
moment.js
into my jar and this is what I have tried. https://github.com/overfullstack/revoman-root/blob/master/src/jsMain/kotlin/Main.kt But the final bundle generated doesn’t have the moment functions as expected. Am I doing it right?
b
And it won't until you declare your external definitions. That annotation just tells the compiler which module should be linked against external definitions in the file
g
Thanks @Big Chungus, I m a newbie in kotlin js n could find examples. Do you mind directing me to any examples you know, write a code snippet to achieve this. Do I need to write external definitions for all functions in moment?
b
Getting a decent grip on externals is no small feat. It's a steep learning curve ;)
The article should get you going at least
Give it a read and if you still get stuck ping me back here or in DM and we can discuss your particular issues.