It would be helpful for our front-end code to include the version of the project at compilation time, so that we can make sure that new deployments have been successful. This value is available in our Github Actions build environment, so we just need to inject it during our webpack compilation stage. I thinking we could either:
Add a static <meta> tag to our base index.html file at compilation time.
Write the version into a js variable, then dynamically insert the meta tag when the page loads.
I'm leaning toward option 2, as that would also give us flexibility if we want to display it in other places (e.g., the page footer, logged to the console, etc.). It's also more indicative of a successful update, since the js code is much more likely to change than the index.html file
It would be helpful for our front-end code to include the version of the project at compilation time, so that we can make sure that new deployments have been successful. This value is available in our Github Actions build environment, so we just need to inject it during our webpack compilation stage. I thinking we could either:
<meta>
tag to our base index.html file at compilation time.I'm leaning toward option 2, as that would also give us flexibility if we want to display it in other places (e.g., the page footer, logged to the console, etc.). It's also more indicative of a successful update, since the js code is much more likely to change than the
index.html
file