Richard Chao
01/12/2022, 10:35 PMbuild/js
output via ./gradlew build
. i have tried to link the build/js
folder via yarn link
and i also tried to npm install it by adding the absolute path to the package.json of the js project. However i am getting the error Error: Can't resolve '@js-joda/core' in home/node/jsProject/node_modules/kotlinProject/kotlin
. I think i am not installing the dependencies correctly in the build/js
folder when i used ./gradlew build
Richard Chao
01/12/2022, 10:36 PMbuild.gradle.kts
has the following
js(IR) {
browser()
binaries.library()
}
to output the build/js
turansky
01/12/2022, 11:14 PMkotlix-datetime
?Big Chungus
01/13/2022, 12:15 AMjanvladimirmostert
01/13/2022, 6:33 AMjs(IR) {
browser {}
binaries.library()
}
then inside my typescript project's package.json which has a relative path to the build directory:
"dependencies": {
"tslib": "2.3.1",
"uhtml": "2.8.0",
"ca": "../../build/js/packages/my-application-ca-server"
},
then inside my index.ts, I need to import com
first before I can do anything
import {com} from "ca"
let blah = com.myapplication.Blah()
Richard Chao
01/13/2022, 2:07 PMid("dev.petuska.npm.publish") version "2.0.4"
and i was able to build and get build/js/packages/kotlin-shared/kotlin/kotlin-shared.d.ts
and build/js/packages/kotlin-shared/kotlin/kotlin-shared.js
Richard Chao
01/13/2022, 2:07 PMError: Cannot find module '@js-joda/core'
at webpackMissingModule
Richard Chao
01/13/2022, 2:08 PMBig Chungus
01/13/2022, 2:14 PMBig Chungus
01/13/2022, 2:14 PMRichard Chao
01/13/2022, 5:53 PM