Vite is a modern frontend build tool that provides an extremely fast development environment and bundles your code for production.
This plugin configures Vite for use with Django backend.
# Install django app (this is required)
pip install django_vite_plugin
# Install vite plugin
npm install django-vite-plugin
//vite.config.js
import { defineConfig } from 'vite'
import { djangoVitePlugin } from 'django-vite-plugin'
export default defineConfig({
plugins: [
djangoVitePlugin([
'home/js/app.js',
'home/css/style.css',
])
],
});
See the official documentation for more details
Documentation for the Django Vite plugin can be found on the Github.
The Django Vite plugin is open-sourced software licensed under the MIT license.