I working on a Vue app in Django via django-webpack-loader, running locally I'm able to get it to work by using the following in my base.html
file:
{% load render_bundle from webpack_loader %}
...
...
{% render_bundle 'app' %}
However, in production this doesn't work - I believe because the webpack production config uses the CommonChunksPlugin to split the bundles into app
, manifest
and vendor
.
There isn't much documentation online for merging Webpack with Django - I'm wondering if there is a way to include all chunks in the Django template.
Did you edit settings.py to point to the bundle directory?
Then use HtmlWebpackPlugin to point to chunks? https://github.com/jantimon/html-webpack-plugin/blob/master/README.md#writing-your-own-templates