Skip to content

fix: resolve server entry filename from bundle chunks#3719

Merged
bartlomieju merged 2 commits into
mainfrom
fix/server-entry-filename
Mar 29, 2026
Merged

fix: resolve server entry filename from bundle chunks#3719
bartlomieju merged 2 commits into
mainfrom
fix/server-entry-filename

Conversation

@bartlomieju

Copy link
Copy Markdown
Contributor

Summary

  • When users customize rollupOptions.output.entryFileNames in their vite config, the server entry file gets renamed but the generated server.js still tried to import "./server/server-entry.mjs" (the hardcoded fallback)
  • Fix: read the entry filename directly from the Vite bundle chunks instead of relying on the manifest, which always reflects the actual output filename

Closes #3655

Test plan

  • Create a fresh project, set rollupOptions.output.entryFileNames to a custom value (e.g. abc.js), run deno task build && deno task start — server should start without "Module not found" error
  • Default config (no custom entryFileNames) still works as before

🤖 Generated with Claude Code

When users customize rollupOptions.output.entryFileNames, the server
entry file gets renamed but the generated server.js still imported from
the default "server-entry.mjs". Fix by reading the entry filename
directly from the bundle chunks, which always reflects the actual
output filename regardless of rollup config overrides.

Closes #3655

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@bartlomieju bartlomieju changed the title fix(vite): resolve server entry filename from bundle chunks fix: resolve server entry filename from bundle chunks Mar 29, 2026
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@bartlomieju bartlomieju merged commit 92e07f0 into main Mar 29, 2026
9 checks passed
@bartlomieju bartlomieju deleted the fix/server-entry-filename branch March 29, 2026 18:45
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.

Deno task start fails with modified rollupoptions' output.entryFileNames due to hardcoded import in the generated server.js

1 participant