This PR improves the static asset build process by using the Mix build system to copy all static files instead of only those which are compiled or relocated. By making Mix aware of all of the static assets, the mix() helper function can be used to add cache busting extensions to all static asset file paths. This in turn allows an aggressive cache policy to be put in place. Although the caching policy only resulted in a marginal speedup in my local environment, I expect it to have a more significant impact in production environments where assets have to travel a greater distance.
This PR improves the static asset build process by using the Mix build system to copy all static files instead of only those which are compiled or relocated. By making Mix aware of all of the static assets, the
mix()
helper function can be used to add cache busting extensions to all static asset file paths. This in turn allows an aggressive cache policy to be put in place. Although the caching policy only resulted in a marginal speedup in my local environment, I expect it to have a more significant impact in production environments where assets have to travel a greater distance.