Hello. Could someone help me with a guide or some ...
# javascript
a
Hello. Could someone help me with a guide or some info onto how to setup and build my existing KMM project (android and ios supported already) for web ? I ONLY want to expose the business layer of the project (all of it is inside the shared module already), no web interface stuff, no back-end, nothing, just front-end logic. I am unable to find a proper guide on how to do just this. There's all sorts of examples with actual html and yarn build commands ... what's the best practice a to z on doing what i require? Simply build the javascript artifacts and give them to my React colleague to import in the existing web app ? How does the project setup look loke and command lines for building it ?! I am simply unable to find a proper example ­čś×
b
Sounds like you'd be better off just exporting your shared kmp module as npm lib for your frontend team to use. Here's an example setup to achieve that https://github.com/mpetuska/npm-publish/tree/master/sandbox/ts-consumer
Note that you'll likely face some issues with @JsExport as it's a lot more limiting than objc or jvm interop
Also plugin used there is entirely optional - it's just a way to remove some of the manual work needed for things to work.