For not IR compilation I am finding that:
Option 1 - Publishing to npm
As mentiopned, the fact some dependencies wont be in NPM. Found this with some kotlin mutliplatform libs were only pushed to maven etc and not published to NPM.
But honestly I can live with this as any missing deps we just publish to our nexus.
However, even this way isnt an option as the package.json generated has absolute paths to the packages_imported
folder dependencies instead of relative paths.
Option 2 - The one big bundled js in dist (or after manually running the webpack build)
Inspecting the output of this shows that there are a lot of things missing. We are creating a library code, with paths that aren’t called inside the codebase, but they are intended to be exported and called from the library consumer.
Seems the DCE is seeing paths that arent used and removing them from the output. But as mentioned they need to be there, and also need to not have obfuscated names when minified.
I tried the gradle kotlin plugins js/browser/keep
settings to try and hint to DCE to leave this alone but the codepaths were always still missing.