Skip to content

add scriptSuffix option to add a hash to the script tag

Sometimes it is useful to add a suffix (or hash) to the script and css tag, to avoid problems with the browser cache. Something like

<script defer src="js/bundle.js?s=1553946721833" type="text/javascript"></script>

to allow that, a new option is available: hash. By default false. It can also be a string.

It adds the suffix to the filename in the html. That lets the user to specify a hash that forces the browser to load the new js file on a new release.

Edited by Javier Jimenez Shaw

Merge request reports