Repository navigation
fix: support relocated client-mode build outputs - #404
Merged
Merged
Conversation
Revive #386. Client-mode prerender and preview follow the resolved client and server directories, still refuse to write a non-OK shell as index.html, and keep the SSR service for host orchestrators. Standalone builds still drop that service only when it sits strictly inside the project root and does not contain client output. Fixes #381. Co-authored-by: Éverton Toffanetto <evertondgn@hotmail.com> Co-authored-by: Cursor <cursoragent@cursor.com>
🦋 Changeset detectedLatest commit: 9f5b744 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
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 |
commit: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Revives #386 (closed by the author with no explanation) against current
next, including the Solid 2.0.0-rc.14 bump. This is the same behavior, reconciled with #383 rather than a blind cherry-pick.server.jsfrom the SSR environment’s resolved/emitted directory and writesindex.htmlinto the client emit directory. A non-OK handler response still fails the build before that write, so a failed shell does not becomeindex.html.start.externalis set, preview may still default them todist/clientanddist/server; a host that relocates inconfigEnvironmentwins.prebuildAppon another plugin, or a userbuilder.buildApp, keeps the SSR service even whenserverFunctionsis off. Standalone client builds still delete it, and only when that directory is strictly inside the project root and is not an ancestor of the client output. Otherwise the plugin warns with the[@solidjs/vite-plugin]prefix and leaves the directory in place.Fixes #381.
Test plan
examples/start-clienttest script (node test/run.mjs && node test/host-build.mjs) on Solid 2.0.0-rc.14: 70/70 existing assertions, plus relocated host/preview builds (configEnvironment, including configured out dirs), unsafe cleanup targets, and failure-path sandbox cleanupMade with Cursor