Visitar URL original
[Bug]: Vite detection truncates public/hot during Herd Share, causing assets to 404 · Issue #1769 · beyondcode/herd-community · GitHub
Skip to content

[Bug]: Vite detection truncates public/hot during Herd Share, causing assets to 404 #1769

Open

Description

@benmcm1994

Platform

Windows

Operating system version

Windows 11 Pro 10.0.26200 Build 2600

System architecture

Intel (x86)

Herd Version

2.0.0

PHP Version

PHP 8.4

Bug description

On Windows, Herd Share’s automatic Vite detection corrupts Laravel’s public/hot file.
When Herd Share starts npm run dev, Vite initially writes a valid development-server URL to public/hot. Shortly afterward, Expose replaces the file contents with an empty string, leaving a zero-byte public/hot file.

Laravel still detects that the file exists and assumes the Vite development server is active. It consequently generates development asset URLs such as:

/@vite/client
/resources/js/app.js
/resources/scss/app.scss

These requests are sent through the shared Laravel URL and return 404 responses, so none of the Vite-managed JavaScript or CSS loads.

This appears to happen because Expose’s Vite-sharing implementation returns early when running on Windows, since it cannot create the Vite child process. However, the Vite monitoring timer continues running and writes the empty shared Vite URL into public/hot.

The application’s Vite entry points compile correctly with both npm run dev and vite build --watch. The problem occurs specifically when Herd Share’s automatic Vite integration is enabled.

TLDR:

Expose does not create the Vite sharing process on Windows, but its monitoring logic still replaces the contents of public/hot with the empty shared Vite URL. Laravel sees the existing file, enables development mode and generates asset URLs that return 404.

Steps to reproduce

Herd share using application
NPM run dev starts
Vite initially creates public/hot containing valid vite url
2 seconds later contents of public/hot are empty
Open site url and observe 404s for js and css files.

Relevant log output

Activity

  1. OrakFR commented on Oct 27, 2026

    @OrakFR

    Same problem but i'm on Macbook M5 Pro with Herd 2.0.1 .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions