Issues with custom webpack loader with Kotlin/JS

I know that we can override webpack config in webpack.config.d directory. So for including LESS style sheets, I placed a file in that directory:

const MiniCssExtractPlugin = require('mini-css-extract-plugin');

config.module.rules.push({
    test: /\.(le|c)ss/,
    use: [
        MiniCssExtractPlugin.loader,
        'css-loader',
        'less-loader'
    ]
})

Now, webpack complains about missing dependencies. I know we can declare dependencies with implementation(npm("project-name")), but how can I declare a dev-dependency?

It can be done since 1.4 release (https://youtrack.jetbrains.com/issue/KT-32531)

Until 1.4.0 is not released, you can try 1.4.0-rc (https://blog.jetbrains.com/kotlin/2020/07/kotlin-1-4-rc-released/_