is something similar available or planned in the new plugin?
i
Ilya Goncharov [JB]
12/13/2019, 2:26 PM
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
Big Chungus
12/14/2019, 6:51 AM
You can do that in devserver config for new js plugin too via gradle dsl
Big Chungus
12/14/2019, 6:52 AM
I'm currently away from pc, so cannot post an example, but it's certainly possible