How does one disable Sourcemap on a Kotlin (JVM &a...
# javascript
c
How does one disable Sourcemap on a Kotlin (JVM & JS) project ? I'm looking to disable sourcemap on my production Jar, but I keep seeing the source map in the browser even after the following gradle configs
Copy code
...
binaries.executable()
browser {


    runTask {
        mode = Mode.PRODUCTION

    }

    webpackTask {
        sourceMaps = false


    }
    commonWebpackConfig {
        sourceMaps = false
        cssSupport { enabled = true }
        mode = Mode.PRODUCTION
    }
}
...
z
thats interesting. ive never used a jvm-based webserver, but in a node environment, source maps arent enabled by default
c
Hey Zachary, thanks for looking into this. I just happened to find the culprit ! I had a webpack-config.js file with this content
Copy code
module.exports = {
        mode: 'development',

    }
Didn't matter what I put in Gradle as this file was overriding Gradle's settings. Upon removing the file or switching the mode, the sourceMap effectively disappeared out of the browser. PROBLEM SOLVED