I would like Vue CLI's dev server to return a string when a specific URL is fetched. For this, I wanted to use webpack dev-server's bypass option. (webpack docs)
I tried this:
devServer: {
proxy: {
'/something': {
bypass: (req, res) => res.send(process.env.SOMETHING),
}
}
}
This causes an error: When proxy in package.json is an object, each context object must have a target property specified as a url string.
I don't need a target option (like in this example)
How can I make this work?