Skip to content

Remove send#135

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

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

Conversation

@tmcw
Copy link
Copy Markdown
Contributor

@tmcw tmcw commented May 10, 2026

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>
<html lang="en">
	<video src="demo.mp4"></video>
</html>

that does work in v3.0.0-alpha.8

@tmcw
Copy link
Copy Markdown
Contributor Author

tmcw commented May 11, 2026

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

Sign up for free to 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