framework icon indicating copy to clipboard operation
framework copied to clipboard

Adding hashes to the _payload.js files

Open kilobyte2007 opened this issue 2 years ago • 5 comments

Describe the feature

When using a CDN like Cloudflare it's normal to use hashes on .js files in order for the cache to be automatically cleared on redeployment as the file name (and the hash) changes.

Now it's not really possible to do that so it's hard to manage re-deployment as we have to manually clean the cache each time. At least that's what I see from the docs.

It would be nice if Nuxt would generate the payload files with a hash, like this: _payload.{hash}.js by default. Or at least an option to specify the file name would be nice to have.

Additional information

  • [x] Would you be willing to help implement this feature?
  • [ ] Could this feature be implemented as a module?

Final checks

kilobyte2007 avatar Nov 09 '22 22:11 kilobyte2007