Thread
#compose-web
    John O'Reilly

    John O'Reilly

    1 year ago
    All the Compose Web samples seem to use
    multiplatform
    plugin......is that necessary or can you just have module containing compose web code with dependency then on a separate multiplatform module?
    Javier

    Javier

    1 year ago
    Maybe it is using that instead of
    kotlin("js")
    for the same reason that desktop samples are using multiplatform instead of
    kotlin("jvm")
    , because it doesnt work correctly and need to be fixed?
    (well, I think it should be fixed already 🤔 )
    John O'Reilly

    John O'Reilly

    1 year ago
    fwiw the compose desktop project I have seems to be ok with
    kotlin("jvm")
    ....had tried
    kotlin("js")
    but running in to some issues
    it is closed so it should work
    John O'Reilly

    John O'Reilly

    1 year ago
    seems to be working ok (with compose desktop using jvm plugin that is)
    k, getting a bit further using
    kotlin("js")
    ...at least one change needed was that
    js
    in the multiplatform module needed to be updated to
    js(IR)
    hmm, but doing that causes other issues when trying to resolve dependencies in the common module
    o

    Oleksandr Karpovich [JB]

    1 year ago
    Hi John! Currently, the compose gradle plugin with web support enables the compiler plugin for js(ir) targets only when the multiplatform plugin applied (https://github.com/JetBrains/compose-jb/blob/master/gradle-plugins/compose/src/mai[…]lin/org/jetbrains/compose/ComposeCompilerKotlinSupportPlugin.kt). As I remember, it was an intentional decision. But I can't recall an exact reason for now. I'll double check with my colleagues.
    John O'Reilly

    John O'Reilly

    1 year ago
    Thanks @Oleksandr Karpovich [JB]. I'd actually gone back to using multiplatform plugin but running in to issues I think because not all dependencies I have support IR compiler
    (am depending on another multiplatform module I have)
    o

    Oleksandr Karpovich [JB]

    1 year ago
    I see. you're right, the JS dependencies need to have IR variant in order to use them with compose-web. does that multiplatform module reside in your project? (I mean is it possible to try out the js(IR) with that module?)
    John O'Reilly

    John O'Reilly

    1 year ago
    yes, it's multiplatform module in same project....I'm trying
    js(IR)
    there but running in to issues with a few of the libraries that I don't think support IR yet
    resolved one of those by updating to later version that's supporting IR but still have 2 more that don't yet
    I created local builds of those 2 libraries with IR enabled and it's running now