4 ms·
Very niche, but if you need it this could definitely save you a few hours. I wish I had this last weekend for a hackathon where I used a stack very similar to t
by sawyerjhood 11y ago
Very niche, but if you need it this could definitely save you a few hours. I wish I had this last weekend for a hackathon where I used a stack very similar to this. I spent longer than I should have to get webpack up and running with Django.
- mrdrozdov 11y agoSilly question, but can't you run Django to serve your backend API, and Webpack to serve your static assets including javascript, then use an http proxy like Nginx to serve them under the same url?
- d215 11y agowell for development that's a good idea. For production you don't want to have webpack serving anything, you want it compiled, right?
- gitaarik 11y agoThat's what I do. Webpack compiles to the static/ dir and Django serves the static files in that dir. I don't know how/why you would do it otherwise.
- withjive 11y agoFor fast development iterations, running webpack's own web server is used for development. Where django would instead load a custom JS endpoint in development, and use the compiled file for production. Webpack static compile each time is just way to slow— I've seen it take 60+seconds to compile.