it does not really matter, since the original files are being kept. So if your file points to a map without a hash it should be served by Django. Of course you need to be careful with long term expiration headers. Should you be using
whitenoise are are fine, since they handle expiration properly and long term expiration headers are only set on hashed files.
- Can celery,celerybeat and django-celery-beat dynamically add/remove tasks in runtime without restart celerybeat?
I see two options available to you. It’s not clear where exactly the cache busting suffix gets added to your files, but at that point you could:
Use some string processing, to manipulate the assets and set their
sourceMapUrlwith a url that is generated by your system and includes the expected suffix
//# sourceMappingURL=/path/to/file.js.<suffix>.map. This could be a simple bash command in a gulp step (if that’s where it happens)
Alternatively, browsers will also accept an http header
SourceMap: /path/to/file.js.mapwhich you could instruct your asset server to set for files with headers. This may be more difficult depending on your infrastructure.
- Django: How to automatically change a field's value at the time mentioned in the same object?
- Django annotating with a first element of a related queryset
- Uncaught ReferenceError: django is not defined
- Difference between Response and HttpResponse django