Open abhinav-anshul opened 1 year ago
It's a common issue when you decide to use wrapper instead of original tool. Esbuild supports dev server + watch mode out of the box - https://esbuild.github.io/api/#live-reload. But tsup doesn't. Do you really need this wrapper in your small/simple library?
For tsup, you can use something like https://tsup.egoist.dev/#onsuccess + live-server.
I am building a not-so-small library and tsup has been a great time saver for many aspect of the bundling process... but i also have this gripe with it. See: https://github.com/egoist/tsup/issues/842
I wish that we could somehow get the same feature or at least get a feature that would allow us to pull out closest equivalent of a raw esbuild config that i could then pass into esbuild directly...
What are you building brother?
Also, I managed to get it together using live-server, someone suggested me to tweak onSuccess
callback to run it on live server.
But yeah #842 would be a game changer!
Hi,
I'm building a small React library using typescript + react + tsup entry point being src/index.tsx & compiling/bundling it to dist/index.js
How should I ideally see my library in localhost? Is there a way to do so using Tsup? If I'm not wrong, I can simply install
live-server
and create oneindex.html
file withdist/index.js
as my script file. Is this ideal?If yes, then while publishing the library to
npm
do i need to manually removelive-server
andindex.html
file everytime?If anyone can help me out on this one, please!
Thanks
Upvote & Fund