Is it possible to dynamically exchange files with the Angular CLI proxy? I would like to do something like this during ng serve
:
const PROXY_CONFIG = {
"/styles.css": {
target: "http://localhost:4200",
secure: false,
pathRewrite: { "^/styles.css": "/styles.theme.css" },
},
};
Unfortunately the proxy rules seem to be ignored if the path in question exists locally. Is it possible to force the proxy to respect the rewrite rule before serving local files?
A demo project for this issue can be found here: https://github.com/kremerd/proxy-demo