livekit / agents-js

Build realtime multimodal AI agents with Node.js
https://docs.livekit.io/agents
Apache License 2.0
163 stars 27 forks source link

Consider using tsup to bundle #157

Open martin-purplefish opened 2 weeks ago

martin-purplefish commented 2 weeks ago

https://github.com/egoist/tsup

I think it'd make things a lot cleaner - it'd mean you don't have to import .js files, you can do import prefixes (e.g. @/agent/foo' instead of '../agent/foo.js' stuff.

nbsp commented 2 weeks ago

interesting! do you know if it'd still work with tsx without transpiling?

martin-purplefish commented 2 weeks ago

I don't know - but it should since it's just bundling things using (mostly) your tsconfig - so I would expect tsx to work fine.

nbsp commented 1 week ago

when we merge CJS support to node-sdks, i'll set up tsup here to transpile the TypeScript to both standards so we have a true dual package.

martin-purplefish commented 1 week ago

Cool! Happy to help!