inertiajs / inertia-django

The Django adapter for Inertia.js
MIT License
326 stars 32 forks source link

How would you use inertia with webpack? #5

Closed darinkishore closed 2 years ago

darinkishore commented 2 years ago

Hi! I only see the vite example for the frontend. Can you use webpack as well?

BrandonShar commented 2 years ago

Absolutely! We actually used to prefer Webpack, but after Rails dropped it we started using Vite for all of our new applications.

I'm not very familiar with what Webpack integrations exist for Django, but the inertia javascript entrypoint should be very similar. Off the top of my head, I think only the imports would change. This folder has examples of what the various inertia.jsx files looked like when we were using Webpack as the default.