Hacker News new | ask | show | jobs
by herge 3524 days ago
Anyone have any success/tips using webpack with django collectstatic?
3 comments

I use https://github.com/owais/django-webpack-loader together with https://www.npmjs.com/package/webpack-bundle-tracker to handle (hashed) file loading from webpack
+1, it's the best way to roll.
i 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

Yeah, it's no different to any other setup. Just have webpack dump the assets into a static folder somewhere ready for collectstatic.
What about during deployments? You run webpack on the server before running collectstatic?