Skip to content

fix: make isBundled per environment#22257

Merged
sapphi-red merged 5 commits into
vitejs:mainfrom
sheremet-va:feat/make-isbundled-per-env
May 14, 2026
Merged

fix: make isBundled per environment#22257
sapphi-red merged 5 commits into
vitejs:mainfrom
sheremet-va:feat/make-isbundled-per-env

Conversation

@sheremet-va
Copy link
Copy Markdown
Member

@sheremet-va sheremet-va commented Apr 17, 2026

Fixes #22086

This PR adds isBundled option to environments. They can override this option manually. experimental.bundledDev sets isBundled in a client environment automatically for backwards compatibility.

This is done by adding applyToEnvironment hook to plugins that should run in bundled mode.

@sheremet-va sheremet-va marked this pull request as ready for review May 7, 2026 17:17
@sheremet-va sheremet-va requested a review from sapphi-red May 7, 2026 17:17
Comment thread packages/vite/src/node/plugins/index.ts Outdated
@github-project-automation github-project-automation Bot moved this to Discussing in Team Board May 12, 2026
@sheremet-va sheremet-va moved this from Discussing to P2 - 5 in Team Board May 12, 2026
@sheremet-va sheremet-va added the p2-to-be-discussed Enhancement under consideration (priority) label May 12, 2026
Comment thread packages/vite/src/node/plugins/esbuild.ts Outdated
Comment thread packages/vite/src/node/plugins/index.ts Outdated
@sheremet-va sheremet-va requested a review from sapphi-red May 13, 2026 10:05
@sapphi-red
Copy link
Copy Markdown
Member

/ecosystem-ci run

@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new Bot commented May 13, 2026

Open in StackBlitz

@vitejs/plugin-legacy

pnpm add https://pkg.pr.new/@vitejs/plugin-legacy@22257 -D
npm i https://pkg.pr.new/@vitejs/plugin-legacy@22257 -D
yarn add https://pkg.pr.new/@vitejs/plugin-legacy@22257.tgz -D

vite

pnpm add https://pkg.pr.new/vite@22257 -D
npm i https://pkg.pr.new/vite@22257 -D
yarn add https://pkg.pr.new/vite@22257.tgz -D

commit: af192e9

@vite-ecosystem-ci
Copy link
Copy Markdown

📝 Ran ecosystem CI on a29bb0e: Open

suite result latest scheduled
nuxt failure failure
react-router failure failure
astro failure failure
quasar failure failure
sveltekit failure failure
vike failure failure
marko success failure
tanstack-start ⏹️ cancelled ⏹️ cancelled
vuepress success failure

laravel, analogjs, unocss, qwik, storybook, module-federation, vite-plugin-react, vite-plugin-svelte, vite-plugin-vue, vite-plugin-pwa, vitepress, waku, vite-environment-examples, vite-setup-catalogue, vite-plugin-cloudflare, vitest, vite-plugin-rsc

@sapphi-red sapphi-red merged commit a576326 into vitejs:main May 14, 2026
26 of 27 checks passed
@sheremet-va sheremet-va deleted the feat/make-isbundled-per-env branch May 14, 2026 09:33
renovate Bot added a commit to andrei-picus-tink/auto-renovate that referenced this pull request May 16, 2026
| datasource | package | from   | to     |
| ---------- | ------- | ------ | ------ |
| npm        | vite    | 8.0.11 | 8.0.13 |


## [v8.0.13](https://github.com/vitejs/vite/blob/HEAD/packages/vite/CHANGELOG.md#small-8013-2026-05-14-small)

##### Features

- **bundled-dev:** add lazy bundling support ([#21406](vitejs/vite#21406)) ([4f0949f](vitejs/vite@4f0949f))
- **optimizer:** improve the esbuild plugin converter to pass some properties of build result to `onEnd` ([#22357](vitejs/vite#22357)) ([47071ce](vitejs/vite@47071ce))
- update rolldown to 1.0.1 ([#22444](vitejs/vite#22444)) ([8c766a6](vitejs/vite@8c766a6))

##### Bug Fixes

- **build:** copy public directory after building same environment with `write=false` ([#22328](vitejs/vite#22328)) ([158e8ae](vitejs/vite@158e8ae))
- **css:** await sass/less/styl worker disposal on teardown (fix [#22274](vitejs/vite#22274)) ([#22275](vitejs/vite#22275)) ([b7edcb7](vitejs/vite@b7edcb7))
- **css:** keep deprecated `name`/`originalFileName` in synthetic `assetFileNames` call ([#22439](vitejs/vite#22439)) ([8e59c97](vitejs/vite@8e59c97))
- make `isBundled` per environment ([#22257](vitejs/vite#22257)) ([a576326](vitejs/vite@a576326))
- **ssr:** avoid rewriting labels that collide with imports ([#22451](vitejs/vite#22451)) ([d9b18e0](vitejs/vite@d9b18e0))

##### Miscellaneous Chores

- remove irrelevant commits from changelog ([#22430](vitejs/vite#22430)) ([6ea3838](vitejs/vite@6ea3838))
- update changelog ([#22413](vitejs/vite#22413)) ([fcdc87c](vitejs/vite@fcdc87c))


## [v8.0.12](https://github.com/vitejs/vite/blob/HEAD/packages/vite/CHANGELOG.md#small-8012-2026-05-11-small)

##### Features

- update rolldown to 1.0.0 ([#22401](vitejs/vite#22401)) ([cf0ff41](vitejs/vite@cf0ff41))

##### Bug Fixes

- **create-vite:** pass react framework to TanStack CLI ([#22397](vitejs/vite#22397)) ([18f0f90](vitejs/vite@18f0f90))
- **deps:** update all non-major dependencies ([#22420](vitejs/vite#22420)) ([2be6000](vitejs/vite@2be6000))
- **module-runner:** prevent partial-exports race on concurrent imports of in-flight invalidated re-export chains ([#22369](vitejs/vite#22369)) ([f5a22e6](vitejs/vite@f5a22e6))
- refer to `rolldownOptions` instead of deprecated `rollupOptions` in messages ([#22400](vitejs/vite#22400)) ([b675c7b](vitejs/vite@b675c7b))
- **worker:** apply `build.target` to worker bundle ([#22404](vitejs/vite#22404)) ([3c93fde](vitejs/vite@3c93fde))
- **worker:** forward define to worker bundle transform ([#22408](vitejs/vite#22408)) ([d4838a0](vitejs/vite@d4838a0))

##### Miscellaneous Chores

- **deps:** update dependency eslint-plugin-n to v18 ([#22423](vitejs/vite#22423)) ([2fe7bd2](vitejs/vite@2fe7bd2))
- **deps:** update rolldown-related dependencies ([#22421](vitejs/vite#22421)) ([66b9eb3](vitejs/vite@66b9eb3))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feat: bundled-dev p2-to-be-discussed Enhancement under consideration (priority) trigger: preview

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

Make isBundled environment specific

2 participants