feat: enable optimizer for server environments during dev#1328
Merged
Conversation
Co-authored-by: Copilot <copilot@github.com>
Member
Author
|
There's a test failing on Windows because of a letter drive difference in the sourcemap path 🤦🏼 EDIT: fixed in sveltejs/kit#15793 |
6 tasks
teemingc
added a commit
to sveltejs/kit
that referenced
this pull request
May 4, 2026
Hope this helps fix sveltejs/vite-plugin-svelte#1328 (comment) EDIT: It does! We don't need the `path.posix.resolve` variant since `to_fs` already posixifies the path later (that code was also written almost 4 years ago). Using it causes Windows to omit the letter drive, which misaligns with Vite's own file resolution. I've verified it fixes the issue by running CI tests with it in sveltejs/vite-plugin-svelte#1328 --- ### Please don't delete this checklist! Before submitting the PR, please make sure you do the following: - [ ] It's really useful if your PR references an issue where it is discussed ahead of time. In many cases, features are absent for a reason. For large changes, please create an RFC: https://github.com/sveltejs/rfcs - [ ] This message body should clearly illustrate what problems it solves. - [ ] Ideally, include a test that fails without this PR but passes with it. ### Tests - [ ] Run the tests with `pnpm test` and lint the project with `pnpm lint` and `pnpm check` ### Changesets - [ ] If your PR makes a change that should be noted in one or more packages' changelogs, generate a changeset by running `pnpm changeset` and following the prompts. Changesets that add features should be `minor` and those that fix bugs should be `patch`. Please prefix changeset messages with `feat:`, `fix:`, or `chore:`. ### Edits - [ ] Please ensure that 'Allow edits from maintainers' is checked. PRs without this option may be closed.
Member
|
Seems like it was unintentionally closed by the related PR. |
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.
building on top of #1185
This PR ensures Svelte works correctly if the Vite dev server is in "full-bundle mode" (
optimizeDepson everything) such as when Cloudflare's Vite plugin is added. It ensures the dev server doesn't reload on initial page request and that Svelte is always bundled on the server unless specifically excluded.The difference between this and the previous PR is an attempt to address Dominik's two concerns: