5👍
If I understand your question correctly, your concern is that after running collectstatic
, you have files like foo.2d32ed.js
, foo.4bhf45.js
, foo.09d9fg.js
in your STATIC_ROOT
directory.
If so, then this isn’t an issue with PyReact or even with django-pipeline; this is occurring because you’re using a cached storage backend (i.e. your STATICFILES_STORAGE
setting). The string appended to your filename is a hash of the file’s contents, which effectively acts like versioning of your static files.
The reason for this is cache-busting on browsers. With filenames as functions of the file’s contents, a browser can cache the file forever, which will speed up page load times for your users on subsequent visits.
If you want to disable this behavior, you can use a non-caching storage backend like PipelineStorage
instead.
Here’s some documentation that may help: