what would be the kjs equivalent of ```module.expo...
# javascript
m
what would be the kjs equivalent of
Copy code
module.exports = MyThingHere
I've been trying to figure out how to do this with gradle and kjs but I haven't been able to generate a js file that looks even close to doing that, in most cases it actually just adds the package as attribute
t
IR or legacy?
m
I don't know the difference but I've got it set to IR since the site said it was better optimized
t
Copy code
@JsExport
val MyThingThere: ...
m
It seems that makes it as
module.exports.MyThingThere = MyThingThere
instead of setting it as the exports object itself
b
I think you can annotate the file itself as JsExport, maybe that will do what you want? @file:JsExport
m
Won't that just apply JsExport to everything in the file?
m
IR doesn't use webpack anymore (or at least, doesn't generate a webpack.config.js and ignores my webpack.config.d files)
t
You can use
binaries.executable()
for webpack activation 🙂
m
but when using executable it seems missing dependencies are set to automatically fail even if present
It inserts
__webpack_require__(Object(function webpackMissingModule() { var e = new Error("Cannot find module 'module/path/here'"); e.code = 'MODULE_NOT_FOUND'; throw e; }()))
to be precise