I have a multiplatform library (only common code) ...
# javascript
e
I have a multiplatform library (only common code) and I'm targeting Android and iOS. My web team is now asking to target js as well, so they can use the library in their regular javascript codebase. I added the target like this:
Copy code
js(IR) {
      if(jsModuleName != null) {
        moduleName = jsModuleName
      }

      useCommonJs()

      browser {
        webpackTask {
          output.libraryTarget = "commonjs2"
        }

        if(isJsLeafModule) {
          binaries.executable()
        }
      }
}
What do I do now in terms of getting a javascript file that I can share with my web team?
a
change binaries.executable() to binaries.library()
­čÖĆ 1
e
Wow hours of searching and that never even came up once ­čśů
s
e
Thanks, super helpful!