Open timwis opened 8 years ago
This isn't something that core Django does, but there are a number of packages that do it. It has been a couple years since I've explored the options. I used to use django-compressor, and looking over the field quickly, that might still be what I'd choose today (it does more than compressing, but precompiling too).
Also, there's some decent analysis of and commentary on the current state of the art at http://owaislone.org/blog/modern-frontends-with-django/, and an alternative possibility at http://owaislone.org/blog/webpack-plus-reactjs-and-django/
Looks like
settings.py
has a setting for a static directory. I wonder if it can execute a command likenpm run build
at startup to compile it?