mlc-ai / web-llm

High-performance In-browser LLM Inference Engine
https://webllm.mlc.ai
Apache License 2.0
13.64k stars 877 forks source link

Transitive dependency of @webgpu/types for Typescript. #631

Open erikh2000 opened 2 hours ago

erikh2000 commented 2 hours ago

My Vite/Typescript-based build broke after upgrading to 0.2.75. I fixed it by installing a missing dependency to @webgpu/types which is in the devDependencies section of package.json. I'm suggesting we could make the install/import go smoother by having the dependency be implicitly installed. (Probably, just moving @webgpu/types to the dependencies section of package.json, but I'd need to test it.)

Noting that the simple-chat-ts example builds fine. I think that is just because it is using parcel and is skipping type checks, so in this case, the @webgpu/types dependency isn't needed. I like my type checks, though. :)

If there is interest, I'll put together a PR. I didn't want to bother writing one if I've missed something in the intent. If people are against having the @webgpu/types be implicitly installed, maybe a brief note in the readme.md to clue a user in would be good. Happy to PR that too.

If this message lands in front of weary maintainer eyes, let me assure you I'm on your side and trying to help.

erikh2000 commented 2 hours ago

I think there are a few more missing transitive dependencies too. My offer is to write a PR that makes them implicit so that a consuming Typescript/type-checked project need only install @mlc-ai/webllm.