Audit long-term cacheability of webpack assets
We need to ensure that our commons chunks on webpack remain cacheable. There are a few things preventing this from working as intended:
-
lint for accidental changes to commons library bundles by accidentally including Vue
ord3
in bundles where they should not be. (#31956 (closed)) -
extract the webpack manifest from the runtime bundle and serve it separately since it changes whenever new bundles are added or removed. -
ensure that we adhere to the advice in this webpack article on long-term caching best practices
Ideally the bundles we have that rarely change never be given a different digest value from one release to another. This includes common.bundle.js
, runtime.bundle.js
, common_vue.bundle.js
, and common_d3.bundle.js
, and many others. Preventing their digest value from changing will allow users to serve these from cache for months at a time.