egoist / egoist/tsup

How can I see changes locally while build a library using tsup?

Open
#878 3 comments 1 reaction 0 assignees View on GitHub
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

Open the contributing 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.