Disabling fingerprinting on asset files

Hi,

When building for the web, expo fingerprints asset filenames. We have a build system that will handle this so I would like to prevent expo from doing this.

I have managed to disable it for javascript files by adding the following to our webpack.config.js:

module.exports = async function (env, argv) {
  config.output.filename = 'static/js/[name].js';
  config.output.chunkFilename = 'static/js/[name].chunk.js';

  // etc etc 
}

It works but unfortunately images and favicons are still being finger printed. How do I disable this?

Thanks

Adam

Quick update, I have found by adding this following line seems to achieve what I want to do but it feels extremely brittle. Is there a better way?

config.module.rules[1].oneOf[1].use.options.name =
    'static/media/[name].[ext]';

Hey @adamtacchi, let me relay this internally to see if we have any recommendations or best practices for handling this.

Cheers,
Adam

This looks like it’s the only way to accomplish what you want. We define the asset loader here.

Thank’s @adamjnav and @bacon. I found the loaders and I was able to just require the image loader and then override and it does the trick.

imageLoaderRule.use.options.name = 'static/media/[name].[ext]';

Thanks for all your help on this.