Skip to content

fix(core): rewrite BUNDLED_DEV_CLIENT_ENTRY for packaged layout - #2384

Open
lofcz wants to merge 1 commit into
voidzero-dev:mainfrom
lofcz:fix/bundled-dev-client-entry-path
Open

fix(core): rewrite BUNDLED_DEV_CLIENT_ENTRY for packaged layout#2384
lofcz wants to merge 1 commit into
voidzero-dev:mainfrom
lofcz:fix/bundled-dev-client-entry-path

Conversation

@lofcz

@lofcz lofcz commented Aug 9, 2026

Copy link
Copy Markdown

Summary

  • rewrite-static-paths already remaps CLIENT_ENTRY and ENV_ENTRY to dist/vite/client/..., but BUNDLED_DEV_CLIENT_ENTRY was left pointing at dist/client/bundledDevClient.mjs.
  • Enabling experimental.bundledDev: true then fails with ENOENT because Vite reads that path with fs.readFileSync, which does not honor the ./dist/client/*./dist/vite/client/* package export.
  • Rewrite BUNDLED_DEV_CLIENT_ENTRY to match the packaged layout (and document it in BUNDLING.md).

experimental.bundledDev reads bundledDevClient.mjs via fs, which bypasses the package exports remap of dist/client/* to dist/vite/client/*. Rewrite the constant alongside CLIENT_ENTRY and ENV_ENTRY so vp dev can start.
@netlify

netlify Bot commented Aug 9, 2026

Copy link
Copy Markdown

Deploy Preview for viteplus-preview canceled.

Name Link
🔨 Latest commit 27c1e32
🔍 Latest deploy log https://app.netlify.com/projects/viteplus-preview/deploys/6a780c43b33bb30008957077

@fengmk2

fengmk2 commented Aug 9, 2026

Copy link
Copy Markdown
Member

@lofcz Thanks for the fix commit.

Could you please submit an issue first to describe the current problem?

@lofcz

lofcz commented Aug 9, 2026

Copy link
Copy Markdown
Author

Experimental dev bundling available in vite 8.1+ is broken due to the path being trivially wrong. With this fix, the feature can be used.

@fengmk2 fengmk2 self-assigned this Aug 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants