-
Hey there, I found out that the project does not work when I use binaries.executable() and I had to use binaries.library(). The main Issue I am having is that the Kotlin is somehow ignoring @JSExport annotation and the code is executed when I run it by using require on the compiled .js file. Do you have any ideas how to go around it except to check if the arguments passed are not empty? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Well Now as for your @JsExport issue, I don't think it's related to either binaries, but rather to IR/Legacy kotlin backend (the annotation is only used by the IR backend). Finally, code execution on I'm closing the issue as it's not related to the plugin, but feel free to reply either here on on kotlinlang slack to see if we can solve your issue regardless. |
Beta Was this translation helpful? Give feedback.
Well
binaries.executable()
support for this plugin simply makes no sense as the plugin is specifically tailored for library assembly and publishing. There is a use-case for it in application context, to help package kotlin.js code to be consumed by local JS/TS application, but even then, from JS/TS perspective the kotlin code is served as a library and not an executable.Now as for your @JsExport issue, I don't think it's related to either binaries, but rather to IR/Legacy kotlin backend (the annotation is only used by the IR backend).
Finally, code execution on
require
depends on what your code is. For example, all top-level values are eager in kotlin.js, therefore any builder logic need…