Because when I use "plain" in compileKotlin2Js the...
# javascript
m
Because when I use "plain" in compileKotlin2Js then nothing is accessible from JS. I need JS filed generated that can be used from JS without modules required.
d
For me running
gradle build
with plain kotlin javascript plugin produces
build/classes/kotlin/main/js.js
, which is a plain js file
m
Yes, but everything is closed. Like in the image I just added. I cannot access
Quote
from JS.
d
In that image you have UMD turned on it seems.
In which case your module will be put into a global variable (
global
in node,
window
in the browser) with the name of your module.
Unless a module system (AMD or commonjs) is found, obviously. That's the point of UMD
m
Thanks, I see my mistake now 🙂