django-manifest-loader and whitenoise
FranciscoKloganB opened this issue · 1 comments
FranciscoKloganB commented
Hello developers;
I already have django-manifest-loader working on my project, but today I started to set up Whitenoise; And I am wondering if there is any wierd interaction between the two packages?
My current flow is:
- Run Webpack with SplitChunks, compression and optimization into Django's
/static/
folder; - Run Django collectstatic to send the contents from
/static/
toSTATIC_ROOT
.
Set STATICFILES_STORAGE = "django.contrib.staticfiles.storage.ManifestStaticFilesStorage"
(default) such that neither Django nor Whitenoise perform any sort of work on my static assets (Webpack does that for me);
Now, my problem arises from here onwards.
-
From what I got from Whitenoise docs, it expects
{% static ... %}
to be used.- Do you know if using {% manifest_match ... %} ruins Whitenoise's operation? Or there is no correlation at all.
-
Django-manifest-loader docs tell us we can set the options below:
-
- Should I set
output_dir
to be the path ofSTATIC_ROOT
which happens to be an absolute path in my system?
- Should I set
-
- Should I set
manifest_file
tostaticfiles.json
, since it is also the approach used by Whitenoise?
- Should I set
-
MANIFEST_LOADER = {
'output_dir': None,
'manifest_file': 'manifest.json',
'cache': env("SERVICE_ENV", default="dev") == "prd",
'loader': DefaultLoader
}
devo-wm commented
What'd you discover integration django-manifest-loader with whitenoise?