-
Notifications
You must be signed in to change notification settings - Fork 541
Open
Description
I’d like to propose evaluating a migration (or partial adoption) from our current Webpack + django-webpack-loader setup to Vite, in order to improve developer experience, build performance, and modern tooling. However, given our Django integration, the migration will require special care and planning.
📌 Context & Constraints (Django + django-webpack-loader)
- We currently use django-webpack-loader to bridge Django templates with Webpack-built assets, by reading a stats/manifest file and injecting script/css tags at runtime.
- This coupling means that any replacement must still allow Django to reference built assets (with hashed filenames, splits, etc.).
- Some Webpack-specific plugins, loaders, or configurations (e.g. custom module resolution, asset handling) may not have direct counterparts in Vite.
- We also often rely on features such as hot reload / HMR in dev mode, and stable builds in production that mesh with Django’s static file system and collectstatic.
- So migrating is not a "drop-in swap"; we’ll need to address how Django will consume Vite assets, replace or replicate webpack-loader behavior, and adapt existing pipeline scripts.
✅ Potential Benefits / Pros
- Faster development builds & better hot-reload
- Vite’s dev server with native ES modules can reduce cold-start times and speed up incremental reloads.
- HMR tends to be more responsive in Vite setups.
- Simpler configuration & less boilerplate
- Vite often requires less configuration for common patterns, reducing long Webpack configs.
- Many modern features (e.g. code splitting, tree shaking) are built in.
- More alignment with modern frontend tools
- Easier compatibility with ESM-based libraries and tools.
- Growing ecosystem around Vite / Rollup / plugins.
raisiqueira
Metadata
Metadata
Assignees
Labels
No labels