Gopal S Akshintala

    Gopal S Akshintala

    5 months ago
    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?
    Big Chungus

    Big Chungus

    5 months ago
    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
    Gopal S Akshintala

    Gopal S Akshintala

    5 months ago
    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?
    Big Chungus

    Big Chungus

    5 months ago
    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.