I have a multiplatform project with shared module ...
# multiplatform
v
I have a multiplatform project with shared module acting like an umbrella module having multiple submodules How can i expose the shared umbrella module as a npm package to use with Vue.js frontend?
I have this in all my modules
Copy code
js(IR){
    browser()
    binaries.executable()
}
a
use binaries.library instead
v
Okay, But that would generate libraries from each submodule of shared module How can i generate only 1 library from shared Where shared module acts as an umbrella module exposing only those submodules which are needed?
a
it will generate one library with its necessary dependencies
v
Even if thats applied on every submodule of shared?
a
if you need just one big js file,you should use whole-program granularity
You dont need to apply it in all submodules. just the umbrella module
v
Oh thanks, so the submodules will just have
js(IR) { browser() }
Also, how can i then use that generated library as a npm dependency on the Vue.js side?
a
yes, submodules don't have to specify the binaries block
You can publish to a specific remote npm registry, I use vedaccio, but I am sure that is not the only way to do so
v
Thanks, i'll check this out