laravel / nova-issues

554 stars 35 forks source link

Custom fields asset versioning #6500

Open vitaliyb opened 4 weeks ago

vitaliyb commented 4 weeks ago

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.

webard commented 4 weeks ago

It should definitely be in core, but for now you can try https://github.com/Muetze42/nova-assets-versioning