How to replace images and files at build without referencing them in the app?

We are rewriting our existing Angular 8 PWA to Vuejs and we are facing a few issues concerning the build process.

Our app must be built for different customers with specific assets for each customers (manifest.json file, icons and images).

In Angular, we accomplish file replacements by defining rules in angular.json file using the fileReplacements key like this:

"configurations": {
        "production-customer-a": {
          "fileReplacements": [
              "replace": "src/manifest.json",
              "with": "src/environments/customer-a/assets/manifest.json"
          // Some more json stuff

We tried to implement a similar process in our vue app in vue.config.js using webpack’s NormalModuleReplacementPlugin like this:

configureWebpack: () => {
let plugins;
switch (customer) {
  case customer-a:
    plugins = [
      new NormalModuleReplacementPlugin(
     // Some more config

It works great if the concerned files are actually referenced in the app using its url at build . Let me explain with an example:

<img src="@/assets/myImageWhichShouldBeReplacedAtBuild.png" /> /* Will actually be replaced and the dist folder will contain the file properly */
<img src="@/assets/myImageWhichShouldBeReplacedAtBuildButIsBase64EncodedWithWebpackUrlLoader.png" /> /* Will be replaced as the base64 string but the dist folder wont contain the file and might be an issue if the image is to be used by files like manifest.json */

The later is not a complete issue since we can override webpack’s url-loader in vue.config.js like explained here. But still a good catch to know about.

Since we don’t reference files like manifest.json or favicon.ico in the Vue templates, those files are not replaced .

Is there anyway to make sure every file we need will be replaced at build to obtain the same result as with Angular’s angular.json config file ? Maybe using something different than NormalModuleReplacementPlugin ?