Is it possible to configure separate browser and n...
# javascript
r
Is it possible to configure separate browser and nodejs sourceSets within a single js target? Thinking about a multiplatform context where they want to share some code but not all.
r
You can define a second js block with a different name:
Copy code
js() {
    //browser {}
}
js("jsWorker") {
    //browser {}
}
This example is for js workers, but I assume the config can be whatever you want.
r
I want it in a single target, though, instead of needing to define two. Reason being, for a library module consumers need to explicitly disambiguate which target they want to consume when there are more than one on the same platform, and I'd like to avoid that.