is something similar available or planned in the n...
# javascript
r
is something similar available or planned in the new plugin?
i
We have plans to provide dsl like webpack settings, so we disuss how we can do it as flixble as Webpack config is But for now you can set it manually for example via
webpack.config.d
Copy code
;(function() {
    const path = require('path')
    const fs = require('fs')

    config.devServer = config.devServer || {}
    config.devServer.proxy = {
        "**": {
            "target": "<http://example.com>",
            secure: false,
            bypass: function (req, res, proxyOptions) {
                if (config.devServer.contentBase) {
                    for (let i = 0; i < config.devServer.contentBase.length; i++) {
                        var file = path.join(config.devServer.contentBase[i], req.path);
                        if (fs.existsSync(file)) {
                            return req.path;
                        }
                    }
                }
            }
        }
    }
})();
b
You can do that in devserver config for new js plugin too via gradle dsl
I'm currently away from pc, so cannot post an example, but it's certainly possible