How can I see changes locally while build a library using tsup?
- Dominant language
- TypeScript
- Stars
- 11.3k
- Forks
- 275
- PR merge metrics
- No merged PRs in 30d
Description
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 one `index.html` file with `dist/index.js` as my script file. Is this ideal?
If yes, then while publishing the library to `npm` do i need to manually remove `live-server` and `index.html` file everytime?
If anyone can help me out on this one, please!
Thanks
Contributor guide
Research direction
Start with the library entry point src/index.tsx and the generated dist/index.js described in the issue. Determine whether the requested local development and publishing workflow belongs in tsup documentation, and consider the question complete only when the documented guidance covers local changes and whether index.html or live-server must be removed before publishing.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- react, typescript
- Domain
- build-system, tooling
- Issue type
- Documentation
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100