nova-issues
nova-issues copied to clipboard
Custom fields asset versioning
- Laravel Version: 10.48.16
- Nova Version: 4.34.3
- PHP Version: 8.2
Description:
Recently, our team encountered a significant problem. We have multiple custom [fields (https://nova.laravel.com/docs/customization/fields.html)
After making adjustments to some fields and pushing changes to production, many of our clients did not receive refreshed assets and experienced crashes while using our product.
Currently, we are forced to manually calculate the MD5 hash of assets and add it as a postfix for the script/style name. However, this is not an ideal solution as it is custom.
Perhaps it would be a good idea to implement such mechanisms inside Nova?
If script/style content is changed - generate version
href="/nova-api/styles/field-$hash"
instead of
href="/nova-api/styles/field"
This will ensure that assets are always up to date.