how do i rewrite this webpack devserver config for...
# javascript
r
how do i rewrite this webpack devserver config for kotlin 2.x? it now wants a mutableListOf<Proxy>(...), but Proxy doesn't have bypass. is there a clean way?
Copy code
devServer = devServer?.copy(
                    open = false,
                    proxy = mutableMapOf(
                        "*" to mapOf(
                            "target" to "<http://localhost:9000>",
                            "bypass" to """
                            function (req, res, proxyOptions) {
                                if (req.headers.accept.indexOf('.js') !== -1) {
                                    return req.headers.accept;
                                }
                            }
                        """.trimIndent()
                        )
                    )
                )
r
You can always use webpack.config.d for more complex stuff