How can I change this line to use a local JS file ...
# webassembly
s
How can I change this line to use a local JS file instead of NPM? https://github.com/StefanOltmann/exif-viewer/blob/4c8dc1383a10ac691ff3b72d0e39c0374970240f/app/build.gradle.kts#L42 Also I wondered if I could put the JS code in my index.html into its own file. If I just create a
draganddrop.js
aside the index.html it will be missing. So I think I need to include it somehow in the config. Right?
1
s
You can check in the root
node_modules
into a vcs, or put your JS code into index.html. But this wouldn’t work with libraries. If you want to include
pako
into
kim
and have it available to all users, then I don’t think we have a decent local solution. Could you file an issue?
👍 1
s
Will do.
s
A hacky way would be to put it inside a
js
:
Copy code
fun pako(): PakoInterface = 
js("""{
you literally put all js code inside this string
}""")
👍 1