It seems to me that kotlin2js doesn’t convert to Javascript code that is not from its own module, correct? In that case how do we import code from a module (common-js) which implements the shared code between platforms (module common) ?
i
ilya.gorbunov
06/23/2018, 2:04 PM
If you have multiple modules built with Kotlin/JS, each gets compiled to its own .js file.
Wow thank you so much I’m trying that immediately!
galex
06/23/2018, 2:13 PM
So then I don’t use the bundle.js file but import each module.js in my web page?
galex
06/23/2018, 2:27 PM
The main error I get is the following:
Module not found: Error: Can’t resolve ‘common-js’ in ‘/Users/galex/multi/backup-chord-view-mpp-before-android/chord-view-js/build/classes/kotlin/main’
@ ./chord-view-js.js 3:4-55
@ multi webpack-dev-server/client?http://localhost:8088/ webpack/hot/dev-server ./chord-view-js
ℹ️ 「wdm」: Failed to compile.
galex
06/23/2018, 2:29 PM
If you got an example of a working project with common - then under - common-js, common_android, common-ios and projects that uses those platforms modules I would really appreciate that