Skip to content

Commit

Permalink
add todo for rpc entrypoint self
Browse files Browse the repository at this point in the history
  • Loading branch information
emily-shen committed Oct 4, 2024
1 parent 9af9701 commit 23291f9
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions packages/miniflare/src/plugins/core/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -249,8 +249,7 @@ function getCustomServiceDesignator(
// Worker with entrypoint
if ("name" in service) {
if (service.name === kCurrentWorker) {
// SELF binding e.g. for Vitest
// This *shouldn't* point to the RW to reflect production behaviour,
// TODO when RPC with assets is fixed in dev: point this router worker if assets are present.
serviceName = getUserServiceName(refererName);
} else {
serviceName = getUserServiceName(service.name);
Expand All @@ -262,7 +261,6 @@ function getCustomServiceDesignator(
}
} else if (service === kCurrentWorker) {
// Sets SELF binding to point to router worker instead if assets are present.
// If there are assets but we're not using vitest, the miniflare entry worker will point directly to RW.
serviceName = hasAssetsAndIsVitest
? ROUTER_SERVICE_NAME
: getUserServiceName(refererName);
Expand Down

0 comments on commit 23291f9

Please sign in to comment.