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

Darren Bell

07/22/2020, 8:49 PM
Hi I'm having issues trying to change the port of the DevServer I have a configuration as follows
Copy code
kotlin {
    js {
        useCommonJs()
        browser {
            binaries.executable()
            webpackTask {
                cssSupport.enabled = true
                devServer = KotlinWebpackConfig.DevServer(true, false, true, true, false, 3000, null, listOf("$projectDir/src/jsMain/resources"))
            }
            runTask {
                cssSupport.enabled = true
            }
            testTask {
                useKarma {
                    useChromeHeadless()
                    webpackConfig.cssSupport.enabled = true
                }
            }
        }
    }
when I run
jsBrowserDevelopmentWebpack
I can see the changes have taking in the generated webpack.config.js. However, when I run
jsBrowserDevelopmentRun
the configuration seems to get overwritten again. Is anyone having success is this area? Im using the latest 1.4-M3
r

russhwolf

07/22/2020, 9:29 PM
Try overriding the dev server in
runTask
as well
d

Darren Bell

07/22/2020, 9:46 PM
Hi. I tried that originally, i tried it again. But still no success
i

Ilya Goncharov [JB]

07/27/2020, 1:08 PM
Hi, please try
1.4.0-rc
which was released today. I believe this issue was fixed in it
d

Darren Bell

07/28/2020, 9:42 AM
@Ilya Goncharov [JB]. Will do thanks
I can confirm this is working now. Many thanks
12 Views