Meteor vite bundling

Hello,

i was trying speed up HMR and to get vite bundling to run with meteor but struggle with it replacing isobuild.

Was following New vite:bundler package: Vite + Meteor and fixed all errors, but now i do still get the normal meteor bundler update ( => Client modified – refreshing ) via hot-module-replacement@0.5.1 . Instead i would like to have vite do the bundling and refresh instantly.

Any links/ideas ? Thank you!

1 Like

Meteor HMR is accomplished via the Meteor package hot-module-replacement. If you run Meteor remove hot-module-replacement does that permit Vite HMR to run?

i tried that too, but did not help

so when i change a file i see PM [vite] hmr update App.jsx (or other files)

but it has no effect on rendering - only after meteor (=> Client modified – refreshing") takes place, i see the changes

Hi. If it’s still an issue, you can try this Meteor-Vite integration GitHub - JorgenVatle/meteor-vite: ⚡ Replace Meteor's bundler with Vite for blazing fast build-times.
For our Meteor + Svelte app it works like a charm.

Hi, thanks for posting your repo! I tried it but could not get it working. im using the react() plugin in vite.config.js. At first i see vite build

I20230901-16:47:23.256(2)? 4:47:23 PM [vite] vite.config.js changed, restarting server…
I20230901-16:47:29.180(2)? 4:47:29 PM [vite] server restarted.

but then when i change a file, only meteor will do HMR