what is the best route to go when you need to buil...
# javascript
j
what is the best route to go when you need to build a kotlinJS project that's consumed by a TypeScript project? I've enabled IR mode which generates TypeScript headers, i've `npm link`ed it so that my TypeScript project can consume it but it's not in a module format that a node + typescript project can easily consume
Copy code
js(IR) {
        browser {
            dceTask {
                keep(
                     ...
                )
            }
            binaries.executable()
        }
    }
Locally this project seems to be using ES6 modules
Copy code
import ChatMessageList from './chat-message-list';
When i auto import Kotlin classes, it does this
Copy code
import ApplicationState = module_name.com.domain.ApplicationState;
this compiles, but does not work when i run the html file with the generated JS i can see the generated KotlinJS in the Parceble js output, but it seems the KotlinJS is using a different module system or something, i'm not very familiar with TypeScript and NPM yet
d
that is how I do imports too
j
i had to adjust the generated TypeScript output, then it works https://youtrack.jetbrains.com/issue/KT-37883
❤️ 1