When building an Angular app with Angular CLI, resources in CSS, e.g. svg images, less than 10kb in size will be inlined.
This sounds like a good concept from the performance point of view, however, it violates very strict Content Security Policies in my app, which I 'm not allowed to change.
My question is as follows: how can I instruct Angular CLI or Webpack NOT to inline any images?
As suggested by @pixelbits, run
ng ejectin shell to eject thewebpack.configfile. This file will allow you to edit the webpack for the application.Inside
webpack.configchangelimitto whatever you require (0) ?This may mean that you can no longer use
ng serveas it won't be aware of your new webpack. As a result, navigate to your new webpack directory (same as theangular-cli.json) and instead runwebpack-dev-server --port=4200ORwebpack-dev-server --hotfor[HMR].