Skip to content

feat(html): process HTML with the plugin container in dev - #20374

Draft
sapphi-red wants to merge 1 commit into
vitejs:mainfrom
sapphi-red:feat/html-process-html-with-plugin-container-in-dev
Draft

sapphi-red wants to merge 1 commit into
vitejs:mainfrom
sapphi-red:feat/html-process-html-with-plugin-container-in-dev

Conversation

@sapphi-red

@sapphi-red sapphi-red commented Jul 8, 2025 •

Copy link
Copy Markdown
Member

Description

Currently, Vite does not process HTML in dev. When building, Vite processes HTML in rollup.

Processing HTML with the plugin container in dev has the following upsides:

The concerns I can think of are:

  • the plugin pipeline may not expect html files to be processed.
    • this won't be a big problem because in build we already process them.
  • makes transformIndexHtml outdated. Maybe it should be deprecated? I'm not sure about the migration path now.

close #20308

TODO:

  • check fs.strict
  • ecosystem-ci

@sapphi-red sapphi-red added feat: html p3-significant High priority enhancement (priority) labels Jul 8, 2025
@github-project-automation github-project-automation Bot moved this to Discussing in Team Board Jul 8, 2025
@sapphi-red

Copy link
Copy Markdown
Member Author

/ecosystem-ci run

@pkg-pr-new

pkg-pr-new Bot commented Jul 8, 2025

Copy link
Copy Markdown

Open in StackBlitz

npm i https://pkg.pr.new/vite@20374

commit: 1ca78dd

@vite-ecosystem-ci

Copy link
Copy Markdown

📝 Ran ecosystem CI on 1ca78dd: Open

suite result latest scheduled
astro ❌ failure ✅ success
histoire ❌ failure ❌ failure
storybook ⏹️ cancelled ✅ success
vike ❌ failure ❌ failure
vitest ❌ failure ✅ success
vite-plugin-rsc ✅ success undefined undefined
nuxt ❌ failure ✅ success
waku ❌ failure ❌ failure
react-router ❌ failure ❌ failure

✅ laravel, analogjs, ladle, marko, quasar, one, vite-plugin-cloudflare, vite-environment-examples, vite-plugin-react, vite-plugin-vue, unocss, rakkas, qwik, vitepress, vuepress, vite-setup-catalogue, vite-plugin-pwa, sveltekit, vite-plugin-svelte

This branch has not been deployed

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

Labels

feat: html p3-significant High priority enhancement (priority) trigger: preview

Projects

Status: Has plan

Development

Successfully merging this pull request may close these issues.

Plugin transformIndexHtml called with a *.html id that's imported and not an entrypoint during vite build.

1 participant