Do you have a JVM module that depends on a JS one?...
# announcements
k
Do you have a JVM module that depends on a JS one? That's not supposed to be possible, right?
c
it is possible... i do it...
the js part produces a bunch of js files which are in the jar... the they are loaded from the jar itself, the whole webapp is a jar with .class and .js in their respective packages
n
I concur with coder82, and would add that generated JS files from the Kotlin JS transpiler can also be included in the JAR along with Java class files.
k
Ah that's a different kind of dependency then, I though your Java code would actually try to use the JS code.
c
ok that ofc no, what I do is: I use these js files inside the jar and put them in the resources dir within the jar so that the webserver serves my static files from there
like this I can pass js files through all jar dependencies automatically reusing gradle dependency handly, and at the end I bundle all of them with webpack
I do this so that I can destructure my projects in modules, so that I have one module with core common functionality and other modules which use those functionalities
so on and so forth, quite handy
k
Right, that does make sense.