Using libs outside of IntelliJ

Kotlin creates a webpack-minified JS bundles, which could not be (in general) used further in development (it could be considered a binary). You can use a library mode in IR though to turn it on use

kotlin{
  js(IR){
    binaries.library()
  }
}

it will produce a library code alongside with TS typings that could be used as a general TS library.