I’m having some problems with a multi module proje...
# javascript
a
I’m having some problems with a multi module project and kotlin2js. My main module depends on my other module using
compile project(":common")
which results in the output JS file having
require('common')
in it which of fails in runtime since there is no module named
common
. Can I somehow make it either inline the library code or require a path instead?
r
maybe someone has an answer in #multiplatform
a
Perhaps, but just to be clear it isn’t a multiplatform project, it’s just javascript
r
ah... I see, I was reading multiplatform project 😄
have you included the common module as <script> as well?
a
It’s compiled as commonjs so no HTML involved
r
unfortunately I have no experience with commonjs setup, hope someone else can help
b
@ansman is it actual? If so could you please provide your project or another simple project to reproduce?
a
Yes, but I got the answer on the forum that this is expected and that you would have to use an external tool to make it work
I think any project that has multiple javascript modules will have this issue