fizker / serve-prepare

Tool for preparing a site for being hosted by https://github.com/fizker/serve
0 stars 0 forks source link

Support rewriting file references to contain content-hash #1

Open fizker opened 4 years ago

fizker commented 4 years ago

A common way to cache-bust files is to add a query-string which is different from the last deploy.

There should be a feature updating file references in HTML pages with just such a query-string, with the content being a hash of the file content.

fizker commented 4 years ago

There are easy alternatives to this. The simplest is to add git-sha or build-time timestamp before invoking this project.

Considering that this is meant to be used with webpack-generated content, a better solution would be generating the HTML file using the HtmlWebpackPlugin.

Because of that, version 1.0 will not contain this feature. It might land in a future version.