I'm stuck. Applying "kotlin-dce-js" to a js proje...
# javascript
s
I'm stuck. Applying "kotlin-dce-js" to a js project is kicking "error: duplicate target file will be created for..." on build. Google has yielded little answers. It seems as though it's trying to output two files with the same name from the node_modules to the same dir. I have failed to locate information on how or if I should configure the scope of what is processes beyond https://kotlinlang.org/docs/reference/javascript-dce.html#configuring. Any help would be appreciated. build.gradle.kts: https://gist.github.com/SorenV/6ae0de00c9529f04e05ef4f17df80d2b settings.gradle.kts: https://gist.github.com/SorenV/06753a7272481ee2ae4e0a8ddb8d853a
a
Yep. Had it as well. Just turned it off for now
s
I see
Thank you for taking the time to respond. Do you know if there is an issue that is or should be opened for it?
a
New plugin is not friendly with dce yet
s
Ah, kotlin-js
?
a
The old lotlin2js should work. There is an issue about production mode for new plugin. Can't find it from the phone.
s
Sounds good, I appreciate it
i
Workaround is move npm dependencies to the second module, and depend the first module on the second In this case, you can apply dce to the first module, and it should work
👍 1
s
🤔 Smart, I will give it a go. Ty sir!
i
FYI ticket about optimized build https://youtrack.jetbrains.com/issue/KT-32323
s
Cool, thank you
a
I'm using the older
kotlin2js
plugin and running into something similar-ish: https://kotlinlang.slack.com/archives/C0B8L3U69/p1566356621237100