django-vite-plugin: A minimalist Vite helper for Django

Alhamdulillah! I’ve just published a new Python package and Vite plugin that will help developers use Vite with Django with zero configuration! :rocket:

With this package and plugin, you can easily take advantage of Vite’s lightning-fast development server and modern build system while building Django applications. This can help speed up the development process and improve overall performance.


I hope you find this package and plugin as useful as I do. Let me know if you have any questions or feedback! :grinning:

Hi there,

Congratulations for this awesome package. But i have to ask this. How does it differ from already established packages like django-vite

The main way it differs is the django-vite-plugin npm package and the connection between the django & vite. See how easily you can set up a project without any configuration at all. But in case of django-vite you have to configure a lot of things and in both front end and backend which is not good for dx. I could not document all of the features yet because of lack of time. Here’s an example:

// app1/static/script1.js
export const hello = () => console.log("Hello everyone!");

And you can import it from another app like:

// app2/static/script.js
import { hello } from '@/app1/static/script1.js'

And there are other features coming that is not possible with the django-vite package because of the way it is implemented.
For the same example, more developer friendly & compact code would be

// app2/static/script.js
// Not implemented yet
import { hello } from '@app1/script1.js'

These are the things you use a lot while developing large applications.
Inshallah after I complete these features and document them properly, it should be pretty self-explanatory.
Thank you for your interest.

You can as well use Django Breeze which makes setting up django projects with vite a breeze.