Skip to content

fix: keep build metadata out of the client output in app builds - #518

Merged
birkskyum merged 1 commit into
nextfrom
keep-vite-dir-private
Oct 31, 2026
Merged

birkskyum merged 1 commit into
nextfrom
keep-vite-dir-private

Conversation

@birkskyum

Copy link
Copy Markdown
Member

Follow-up to #511 (#511 (comment)): under Nitro the client build writes into the public directory, so /.vite/manifest.json and /.vite/solid-server-functions.json were served. When one process builds both environments, the server now reads both from memory, the plugin removes the manifest it turned on (set build.manifest to keep it), and the server-function file moves to the server output. Separate vite build / vite build --ssr runs are unchanged.

When one process builds both environments, the server build reads Vite's
manifest and the server-function data from memory. The plugin then removes
the manifest it turned on (an app's own build.manifest stays) and moves
.vite/solid-server-functions.json beside the server bundle, so hosts that
publish the client output, like Nitro, don't serve them.
@changeset-bot

changeset-bot Bot commented Oct 31, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 764b37d

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@solidjs/vite-plugin Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@pkg-pr-new

pkg-pr-new Bot commented Oct 31, 2026

Copy link
Copy Markdown

Open in StackBlitz

npm i https://pkg.pr.new/@solidjs/vite-plugin@518

commit: 764b37d

@birkskyum
birkskyum merged commit 4deb52e into next Oct 31, 2026
6 checks passed
@birkskyum
birkskyum deleted the keep-vite-dir-private branch October 31, 2026 00:53
birkskyum added a commit that referenced this pull request Oct 31, 2026
…mory (#519)

Since #514 and #518, a server build in the same process as the client
build reads the build id, the server-function modules and Vite's manifest
from memory. The recorded client output directory could then only lead to
a stale file, so readers fall back to the configured outDir and the
dist/client convention only.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant