Skip to content

Remove send - #135

Open
tmcw wants to merge 4 commits into
11ty:mainfrom
tmcw:no-send
Open

Remove send#135
tmcw wants to merge 4 commits into
11ty:mainfrom
tmcw:no-send

Conversation

@tmcw

@tmcwtmcw commented May 10, 2026

Copy link
Copy Markdown
Contributor

This code used send, but only for content-range requests. send is a pretty deep dependency, and not used very much.

https://node-modules.dev/chart/treemap#install=@11ty/eleventy-dev-server

CleanShot 2026-05-10 at 14 17 06@2x

This PR ports the relevant parts to eleventy-dev-server directly. Eliminates 409kb and 17 dependencies. I think the one question mark is whether this needs to adapt send's content-type support or media content.

@zachleat

Copy link
Copy Markdown
Member

This one relates to #62. I did test locally and ran into this error

[11ty/eleventy-dev-server] Uncaught exception: RangeError [ERR_OUT_OF_RANGE]: The value of "start" is out of range. It must be <= "end" (here: 14404). Received 327680
at new ReadStream (node:internal/fs/streams:219:13)
at Object.createReadStream (node:fs:3191:10)
at file:///Users/zachleatherman/Code/eleventy-dev-server/server.js:738:35
at FSReqCallback.oncomplete (node:fs:195:5) {
code: 'ERR_OUT_OF_RANGE'
}

via a

<!doctype html><htmllang="en"><videosrc="demo.mp4"></video></html>

that does work in v3.0.0-alpha.8

@tmcw

tmcw commented May 11, 2026

Copy link
Copy Markdown
ContributorAuthor

Okay! Yeah this needs a little more manual testing, and I'll see if I can create a unit test that catches that condition.

@zachleatzachleat added this to the Eleventy Dev Server v3.0.0 milestone Jun 4, 2026
@zachleat

Copy link
Copy Markdown
Member

Maybe #141 might solve this a little cleaner!

@tmcw

tmcw commented Aug 5, 2026

Copy link
Copy Markdown
ContributorAuthor

Okay, put some polish and additional testing into it!

Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@tmcw@zachleat