TunnelPad

Vite & Laravel

When you share a Laravel project while npm run dev is running, your pages load their CSS and JavaScript from the Vite dev server on localhost, which visitors can't reach. TunnelPad fixes this automatically.

Run tunnelpad share from the project's folder (or pass --vite=/path/to/project). TunnelPad:

  1. notices Vite's public/hot file;
  2. shares the Vite dev server through a second tunnel;
  3. points public/hot at that tunnel while you share, so pages load assets from it, and hot reload works for visitors too;
  4. puts public/hot back when you stop.

To turn this off, use --no-vite. If you build your assets with npm run build instead, there's nothing to do.