Starting a Django and VueJS Project painlessly with Webpack support.
Setting this up might be a little headache, especially when we'll like to maintain webpack as our module bundle.
I've found alot of hacks on the web around this but I'll be discussing a way use Webpack transparently with Django with hot reloading Vue components.
This requires implementing the following:
I forked a repo on github (see here), added a more detailed guide to it and improved on it with support the following:
- VueJS v2
- Django CORS
And now, starting a Django and VueJS Project is as easy as running:
django-admin startproject projectname --template https://github.com/timtech4u/hello-vue-django/archive/master.zip
- Replace projectname with your Project's name
Full details here: https://github.com/Timtech4u/hello-vue-django
You can plug in whatever Rest API framework of your choice and also choose from the available list of Vuejs UI frameworks available.