Ok I tried but it didn`t work for me.
When I execute the packJsNpmPublication task I get an publications folder with node_modules, package.json and so on.
I published it and when I try to install it via npm I get the errors:
syscall rename node_modules/ktor-ktor-client-json-jsLegacy
and using external npm dependencies seems not possible