fix: disable lazy barrel in bundled dev (fix #22749)#22801
Closed
mturac wants to merge 1 commit into
Closed
Conversation
mturac
force-pushed
the
izon/fix-bundled-dev-date-fns-locale
branch
3 times, most recently
from
June 28, 2026 23:10
5c7a4b3 to
4be2141
Compare
Author
|
The remaining red check looks unrelated to this patch.
The other Build&Test matrix jobs passed. This patch only touches bundled dev / the I tried to rerun failed jobs, but GitHub rejected it with: |
|
I can confirm that this fixes the issue I reported. |
7 tasks
mturac
force-pushed
the
izon/fix-bundled-dev-date-fns-locale
branch
from
July 4, 2026 11:41
4be2141 to
16379aa
Compare
mturac
force-pushed
the
izon/fix-bundled-dev-date-fns-locale
branch
from
July 4, 2026 11:44
16379aa to
4b7c09d
Compare
Member
|
Thanks, but this was done on the Rolldown side: rolldown/rolldown#10060 |
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.
Description
Fixes #22749.
Full-bundle dev currently leaves Rolldown's lazy barrel optimization enabled. With barrel imports such as
import { pl } from 'date-fns/locale', the generated dev bundle can retain references to symbols that are no longer declared (for exampleformatDistance$93), which crashes the entry before the app code runs.This disables
experimental.lazyBarrelonly for bundled dev, next to the existinginlineConstworkaround in the same code path.Alternatives checked
1.1.3is still latest, so there is no dependency bump path yet.treeshake; it did not fix the missing symbol output.optimization.pifeForModuleWrappers; it did not fix the missing symbol output.Tests
pnpm --filter vite run buildpnpm run test-serve bundled-devpnpm run test-build bundled-devpnpm run test-serve hmr-full-bundle-modepnpm exec oxfmt --check packages/vite/src/node/server/bundledDev.ts playground/bundled-dev/__tests__/bundled-dev.spec.ts playground/bundled-dev/main.js playground/bundled-dev/package.json playground/bundled-dev/vite.config.tspnpm exec eslint packages/vite/src/node/server/bundledDev.ts playground/bundled-dev/__tests__/bundled-dev.spec.ts playground/bundled-dev/main.js playground/bundled-dev/vite.config.tsgit diff --checkNo documentation update is needed because this is an internal workaround for experimental full-bundle dev mode.