Kotlin JS incremental compilation

Without incremental compilation, the Webpack dev server was not able to reload on changes because js compile output files get deleted during compilation. My workaround is to disable incremental build and place a Webpack configuration file in webpack.config.d folder with the following content.

if (defined.PRODUCTION === false || defined.PRODUCTION === 'false') {
    config.devServer = {
        watchOptions: {
            aggregateTimeout: 5000,
            poll: 1000
        }
    }
}

Now i am able to use Webpack dev server with HOT and must not restart the whole dev server for each change.

Maybe this helps other people with the same problem.