hi, can we use DCE from Maven kotlin plugin or by ...
# javascript
j
hi, can we use DCE from Maven kotlin plugin or by directly calling compiler?
👀 1
b
Hi! Yes you can. We don’t have a dedicated plugin to call it from maven, but you can use command line version
kotlin-dce-js
, you can find it in
bin
directory of compiler distribution (e.g. from GitHub). Alternatively you can run
kotlin-compiler.jar
with
org.jetbrains.kotlin.cli.js.dce.K2JSDce
as a main class. You can take
kotlin-compiler.jar
from
lib
dir of compiler distribution (see above) or from Maven Central.
To get command line options call it with
-h
Please don’t hesitate to ask any questions and let us know if you need additional help with it.
j
Hi Zalim, this is great, many thanks!
Hi @bashor, if i run "kotlin-dce-js.bat myCompiledApp.js" I get: Argument for @NotNull parameter 'sourceBaseDir' of ...SourceMapBuilderConsumer.<init> must not be null. cannot find anywhere how this can be setup, thanks!
sorted out
👍 1