I have some isolation problems when using two gene...
# javascript
v
I have some isolation problems when using two generated JS files at the same time from different projects(migrating). Basically i want them both to work at the same time. They both work separately fine but using both I get ClassCastException and other exceptions using when using coroutines. Any way to fix this.
Simple reproduction with one project
Copy code
fun main() {
    GlobalScope.launch (Dispatchers.Default){
        var i = 0
        while (true){
            println(Count ${i++}")
            delay(10_000)
        }
    }
}
now load it twice inside html
Copy code
<script src="bundle2.js"></script>
<script src="bundle2.js"></script>
only the first one stays. Second stops with exception.