Skip to content

Conversation

@ascorbic
Copy link
Contributor

Currently, if Vite can't resolve a worker entrypoint it throws the confusing error Error: [vite]: Rollup failed to resolve import "virtual:cloudflare/user-entry" from "virtual:cloudflare/worker-entry". Previously this was not encountered often, because missing entrypoint files are caught earlier. However with bare modules and dynamically-generated config this is possible to run into. This PR catches the failed resolution and throws a more helpful error.


  • Tests
    • Tests included/updated
    • Tests not necessary because:
  • Public documentation
    • Cloudflare docs PR(s):
    • Documentation not necessary because: just an error update
  • Wrangler V3 Backport
    • Wrangler PR:
    • Not necessary because: not wrangler

@ascorbic ascorbic requested a review from a team as a code owner November 28, 2025 17:36
@ascorbic ascorbic requested a review from a team November 28, 2025 17:36
@changeset-bot
Copy link

changeset-bot bot commented Nov 28, 2025

🦋 Changeset detected

Latest commit: dc2bb89

The changes in this PR will be included in the next version bump.

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@pkg-pr-new
Copy link

pkg-pr-new bot commented Nov 28, 2025

create-cloudflare

npm i https://pkg.pr.new/create-cloudflare@11466

@cloudflare/kv-asset-handler

npm i https://pkg.pr.new/@cloudflare/kv-asset-handler@11466

miniflare

npm i https://pkg.pr.new/miniflare@11466

@cloudflare/pages-shared

npm i https://pkg.pr.new/@cloudflare/pages-shared@11466

@cloudflare/unenv-preset

npm i https://pkg.pr.new/@cloudflare/unenv-preset@11466

@cloudflare/vite-plugin

npm i https://pkg.pr.new/@cloudflare/vite-plugin@11466

@cloudflare/vitest-pool-workers

npm i https://pkg.pr.new/@cloudflare/vitest-pool-workers@11466

@cloudflare/workers-editor-shared

npm i https://pkg.pr.new/@cloudflare/workers-editor-shared@11466

@cloudflare/workers-utils

npm i https://pkg.pr.new/@cloudflare/workers-utils@11466

wrangler

npm i https://pkg.pr.new/wrangler@11466

commit: dc2bb89

@github-project-automation github-project-automation bot moved this from Untriaged to Approved in workers-sdk Dec 1, 2025
@ascorbic ascorbic merged commit 4f15699 into main Dec 3, 2025
31 of 32 checks passed
@github-project-automation github-project-automation bot moved this from Approved to Done in workers-sdk Dec 3, 2025
@ascorbic ascorbic deleted the mk/vite-plugin/unresolved-main branch December 3, 2025 20:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants