A minimal demo showing how to wire up Webpack of a Vue CLI app to Django templates without extra plugins.
The purpose of this repository is to demonstrate a slightly more canonical approach of including Webpack bundles from a Vue CLI project into Django templates without any additional plugins. It utilizes the index.html generated by html-webpack-plugin and the {% extends %} tag in Django templates. All the Vue.js / Vue CLI / Webpack features such as dev server, client-side routing, hot module replacement, code-splitting, filename hashes, and prefetch tags should work fine in this demo. The approach has been popularized by @Ejez and is documented in the official Vue CLI documentation.
To run the demo, follow these steps:
pip install djangocd client && npm installnpm run servenpm run buildcd serverpython manage.py runserverThis repository provides a demo of how to include Vue CLI bundles into Django templates without additional plugins. It utilizes the index.html generated by html-webpack-plugin and the {% extends %} tag in Django templates. All Vue.js / Vue CLI / Webpack features should work fine in this demo, including the dev server, client-side routing, hot module replacement, code-splitting, filename hashes, and prefetch tags. This approach, popularized by @Ejez, provides an alternative to using django-webpack-loader and gives users more options to choose from.