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
diesieben07
07/17/2018, 12:28 PM
For me running
gradle build
with plain kotlin javascript plugin produces
build/classes/kotlin/main/js.js
, which is a plain js file
m
marcinmoskala
07/17/2018, 1:14 PM
Yes, but everything is closed. Like in the image I just added. I cannot access
Quote
from JS.
d
diesieben07
07/17/2018, 1:17 PM
In that image you have UMD turned on it seems.
diesieben07
07/17/2018, 1:18 PM
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.
diesieben07
07/17/2018, 1:18 PM
Unless a module system (AMD or commonjs) is found, obviously. That's the point of UMD