Repository navigation
feat(build): new manifest format and include html tags - #23837
Open
sapphi-red wants to merge 9 commits into
Open
sapphi-red wants to merge 9 commits into
sapphi-red wants to merge 9 commits into
Conversation
Member
Author
|
/ecosystem-ci run |
@vitejs/plugin-legacy
vite
commit: |
|
📝 Ran ecosystem CI on
✅ vite-plugin-pwa, marko, astro, vitepress, vite-plugin-vue, vike, vite-environment-examples, vite-setup-catalogue, vuepress, laravel, nitro, vite-plugin-react, quasar, vite-plugin-svelte, waku |
Member
Author
|
The type errors are expected as this PR changes them |
4 of 6 tasks
teemingc
added a commit
to sveltejs/kit
that referenced
this pull request
Nov 17, 2026
The large number of lines changed are just lockfile lines changed. In a SvelteKit app the Vite DevTools dock never shows up because SSR apps don't support Vite's `transformIndexHtml` hook which injects the dock. This PR now adds the dock as documented in the DevTools [docs](https://devtools.vite.dev/guide/#projects-without-an-html-entry) when the package is installed and enabled: ```js // vite.config.js export default defineConfig({ devtools: { apply: 'serve' }, plugins: [sveltekit()] }); ``` We can remove all of this PR's work once vitejs/vite#23837 is merged and we support it (essentially enables `transformIndexHtml` for SSR apps) --- ### 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 - [x] This message body should clearly illustrate what problems it solves. - [x] 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 - [x] 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 - [x] Please ensure that 'Allow edits from maintainers' is checked. PRs without this option may be closed.
This branch has not been deployed
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.
Plugins using
transformIndexHtmldoes not work well with backend integration or meta-frameworks rendering the HTML on their own. This PR tries to fix that by exposing the tags injected by plugins in the manifest.This PR introduces a new V1 manifest format, which can be enabled by
experimental.newManifestFormat(the old one is now called V0). The format looks like{ "version": 1, "chunks": { "main.js": { ... } }, "htmlTags": [] }During manifest generation, Vite calls
transformIndexHtmlhooks in their usual order with html set to undefined and the output bundle available in the context. The returned tags are collected and put in the manifest.The plan is to add more document once it's confirmed that it works and then make the output V1 in the next major.
refs vitejs/ecosystem#15