https://kotlinlang.org logo
#multiplatform
Title
# multiplatform
j

Janelle Fullen

03/03/2020, 11:55 PM
Hi, I am trying out 1.3.70 but don't see the browserProductionWebpack task in my IntelliJ Gradle menu. I have updated my IntelliJ Kotlin plugin, and bumped the version of Kotlin I'm using for my gradle plugin to 1.3.70. I am also using the multiplatform plugin. Not sure what I'm doing wrong.
j

jw

03/04/2020, 12:31 AM
do you have
kotlin { js { browser() } }
?
j

Janelle Fullen

03/04/2020, 1:20 AM
it works when I add the browser target
I didn't have it previously
However, we were using nodejs { }
Is there a difference using browser as the target?
j

jw

03/04/2020, 1:25 AM
Yes it only works for browser targets
b

Brandon Saunders

03/04/2020, 6:56 PM
what is the distinction between nodejs and js?
with respect to why the dce only works on js rather than nodejs
j

jw

03/04/2020, 7:34 PM
size is not an issue on servers, presumably
b

Brandon Saunders

03/04/2020, 7:35 PM
got it, then if that's the case is there a way to get the jsBrowserProductionWebpack task to work with an output librarytarget of commonjs?
currently for our project it doesn't seem to be using the same webpack.config we had been using prior to 1.3.70
ahh i think i may have found the issue. We had previously been calling webpack on our own. The task seems to assume the existence of a webpack.config.d folder. I'll try that
hmm... no that didn't see to fix it. I'm still not getting a commonjs library despite the webpack.config.js file in my webpack.config.d folder saying to make it so
we're pretty sure the file is being used, because syntax errors in it cause the jsBrowserProductionWebpack task to fail