When deploying updates to your new shiny app, you're going to want the browser to fetch the latest version if there has been an update, rather than using the cached version the browser may store. The simplest way we can do this is by appending a content hash to the filename, to ensure that when you push a new update, a new hash will be created, thus invalidating the previous cached versions.
To do this, we can use a simple plugin called broccoli-asset-rev:
yarn add --dev broccoli-asset-rev@^2.7.0
Now, update your
What we've done here, is add the
AssetRev plugin as the last plugin to the tree, for production builds only. It will
map files, and will update
js files with any
references to the original un-hashed file, with the new hashed file. There are additional options to specify a prefix
so that files can be hosted on a CDN if you wish, see the plugin github page.
yarn build-prod and checkout the
Completed Branch: 13-fingerprints