How do I split up my app into multiple separate mo...
# javascript
s
How do I split up my app into multiple separate modules? I tried moving my external definitions into libraries, and then compile them into my main module, and I'm getting errors running my code now. If I move it all back into 1 module, the error goes away.
a
What kind of error are you getting?
Could it be the library you need is not `require`'d?
s
probably. Do I need to export the library with the same module kind as my compiled module?
a
Make sure you are actually using declarations marked with
@JsModule
.
Or mark the whole file with declarations (
@file:JsModule("the-library-this-is-for-name")
)
(Depending on what the library you are writing declarations for actually exports)