With the Kotlin Gradle JS plugin with `nodeJs` tar...
# javascript
v
With the Kotlin Gradle JS plugin with
nodeJs
target, with 1.3.72 there was a
run
task automatically. Now with 1.4.0 there is no
run
task anymore. You can use
binaries.executable()
then you at least get a
nodeRun
task, but no
run
task. Is that an expected change? I cannot remember having seen this in any of the update blog entries.
b
It was discussed in 1.4.0-M1 release notes I think
But yeah, this is now expected behaviour
v
That you need to specify
binaries.executable()
explicitly, yes. But that there is no
run
task anymore?
b
That too. All tasks are now explicit.
v
You got me right, that there is no
run
task, even when using
binaries.executable()
, right?
What the ..., now it is there again. I could have sworn it was absent.
Maybe confused something
i
Hi, honestly it is not expected, if you have no
run
task, it is bug, and pleasy youtrack it, I tried it on my sample project, and it exists
v
Yeah, as I said, now it's there, I probably partly confused state with and without
binaries.executable()
or so.
Thanks for double-checking
Btw.
binaries.executable()
will still not cause webpack being configured and run for
nodeJs
target, correct?
i
Only
run
for
nodejs
, webpack is not supported in
nodejs
yet
v
Ok, then I continue using a separate
@vercel/ncc
run for that, thanks
b
Oops, my bad
v
Actually not 😄
Hm, I guess the
compileKotlinJs
task is part of the
binaries.executable()
condition? Then however it is implemented, it prevents typesafe accessors in pre-compiled script plugins to be generated. :'-(
Hm, no, the
compileKotlinJs
is there even without the
binaries.executable()
call, but the accessor is missing anyway
i
It is accessible only after you write
Copy code
kotlin {
   js {
   ...
   }
}
It is because you can use
both
mode, where you will have
compileKotlinJsLegacy
and
compileKotlinJsIr
instead of
compileKotlinJs
So it is unnecessary to register this task
v
Well, there could be a
compileKotlinJs
that has no actions and depends on both of the others, then a consumer can always use
compileKotlinJs
no matter which mode was chosen. 🙂
🙏 1