[Vuejs]-How to integrate VueJS with Django and deploy them

0👍

If your project relies only on Django/DRF api, you can deploy your frontend separately.

If your project needs only a Vue component to be displayed on some page, but otherwise takes advantage of Django’s renders, you need to include your Vue app into Django project.

Just creating a folder inside static/js/Vue to store all related code will be enough in terms of structuring. Then you’ll need to integrate your Webpack into Django template. For this you’ll find django-webpack-loader useful. Also this tutorial.

Leave a comment