Replies: 1 comment
-
Hello—Thanks for posting this!
If you want cache busting, but you don't want to use (or can't use) Lines 40 to 45 in fd500cc During the process of creating the zip file, it does a search-and-replace for the constant definition containing the version and replaces its value with the current time (converted to seconds) in base 36. (This is based on how Drupal does—did?—cache busting on similar resources.) I have seen people do cache busting by calculating an MD5 hash for the files each time they're enqueued, but that approach always made me uncomfortable. I'm sure it's not that computationally expensive a process, but I'd still prefer to do it as part of a build or deployment process. Hope that helps! I'm going to convert this to a discussion, but please feel free to let me know if you have any other questions. |
Beta Was this translation helpful? Give feedback.
-
We want to build the build script
npm run production
into our deployment pipeline. GMD2024_VERSION never changes so cache busting files not working.Beta Was this translation helpful? Give feedback.
All reactions