3 ms·
Anyone have any success/tips using webpack with django collectstatic?
by herge 10y ago
Anyone have any success/tips using webpack with django collectstatic?
- bendavis381 10y agoYeah, it's no different to any other setup. Just have webpack dump the assets into a static folder somewhere ready for collectstatic.
- herge 10y agoWhat about during deployments? You run webpack on the server before running collectstatic?
- misiti3780 10y agoi do this, i just dump assets (uncompressed) into a build directory and use django pipeline for deployment. works fine for me. if you want to see it in action look here: https://github.com/josephmisiti/generic-django-project https://github.com/josephmisiti/generic-django-project
- steffenmllr 10y agoI use https://github.com/owais/django-webpack-loader https://github.com/owais/django-webpack-loader together with https://www.npmjs.com/package/webpack-bundle-tracker https://www.npmjs.com/package/webpack-bundle-tracker to handle (hashed) file loading from webpack
- civilian 10y ago+1, it's the best way to roll.