sergei-maertens / django-systemjs

MIT License
42 stars 5 forks source link

Doesn't work with ManifestStaticFilesStorage #8

Closed sergei-maertens closed 8 years ago

sergei-maertens commented 8 years ago

This storage collects the static files with a partial md5 hash injected, and then writes the unhashed name -> hashed name mapping to a manifest.json file. This happens in the post-process step.

Django-SystemJS applies the configured storage post-process, but in a separate step. Each of the two steps first remove the old manifest file and re-create it. So, systemjs_bundle management command causes the result of collectstatic to be undone.

Solution: subclass the the storage in SystemJS, and before saving the new result, load the old result and append so that the old file is retained. We need to ensure that during a collectstatic run the old file is deleted.

sergei-maertens commented 8 years ago

Fixed in develop