teamspaces / web

Web & API – Spaces is knowledge management for teams.
0 stars 0 forks source link

Webpack chunkhash instead of hash #244

Closed MrTin closed 6 years ago

MrTin commented 7 years ago

What

We are currently busting all assets on a new build which is unnecessary. If we make use of the chunkhash instead of hash we can expire only assets that should be expired. Right now, our vendor will not change very often and might be as much as 2MB(!) to load. The things we do iterate on, our editor and all other application javascript is usually less than 10K so it makes sense to only expire this resource, we will save bandwidth and so will the client, and reduce loading times.

To do this however we also need to replace our ASSET_FINGERPRINT with eg. ASSET_APPLICATION_FINGERPRINT and ASSET_VENDOR_FINGERPRINT.

Example

Instead of /javascripts/[name]-[hash].js we should use /javascripts/[name]-[chunkhash].js.

MrTin commented 6 years ago

Don't think this is applicable any longer since you changed to use websockets with rails