I'm not an expert so I'll point you to the
docs
Another suggestion would be to use the KMP wizard and make a JS only project. Take note of the gradle and folder structure differences and emulate it ... (or look at any open source project that builds to JS and do the same)