Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feature: tsup builds #843

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from

Conversation

RobbyUitbeijerse
Copy link

@RobbyUitbeijerse RobbyUitbeijerse commented Dec 1, 2023

I've been using tsup for a while to create esbuild based builds a lot faster than Webpack ever could. The webpack configuration is pretty simple, allowing for a smooth transition.

Noteworthy: the dist output structure does change with this switch.

There are a couple of things that need to happen before this is ready. Let me know if you're interested so I can take a look.

  1. The mocha test runner is depending on the webpack set-up, I think this could easily be moved to the web test runner
  2. Documentation changes about the changing dist directory structure
  3. Adjust the ci/cd tests
  4. Will need to properly the tweetnacl-js case that is handled in the current webpack set-up

@emg110
Copy link

emg110 commented Dec 2, 2023

Tsup is a great tool but Are you proposing the addition of support for tsup or is it replacing webpack with tsup? If that's the latter then may I humbly ask why do you think this big change should happen (I mean which critical issue or shortcoming does this change address or solve?) and what would be the benefits?
Because there are many different build tools out there and if every developer PRs their own prefered method into an opensource library , well that would not be ideal (all IMHO)!
Plus , Tsup has some road to walk before becoming 100% ready (style loaders are still incomplete and experimental) for all-purpose production and does not enjoy the vast plugin ecosystem that already exists around projects like Webpack and Rollup!

@RobbyUitbeijerse
Copy link
Author

Hey! That's fair - I'm not aiming to solve any existing problem but rather try to share tools and experience that I came across throughout time. This year I've moved most of my preferred toolchain to go/rust based tools, another example of that being the biome PR. These tools don't solve an existing issue on their own as much as they allow me and my team to enjoy programming more on a day to day basis

Throughout time, the development community moved from Bower to npm and Gulp to Webpack. Those transitions wouldn't have happened without people making an effort of improving the things they're building. The same goes for one of the existing pull requests, which moves ts-node to tsx , and for people moving from npm to pnpm or yarn.

Regarding tsup specifically; it have been solid me and due to the use of esbuild is remarkably faster than webpack while only requiring a single dependency to both compile whatever you want and generate types. The style loading comment is fair - however as this is a js sdk, so while it's true - it's not quite relevant here. Let me know if you're interested, also happy to move it to e.g. SWC or close the PR.

@emg110
Copy link

emg110 commented Dec 4, 2023

My humble comment was not to discourage you at all since these contributions are great but I just humbly mentioned : Usage of technology , IMHO, should be because of solving a problem not just because it is possible to use or implement! I am just another contributor and community memeber like you and do not have any role in accepting, reviewing or rejecting anything here! Best of luck and thank you very much for your contribution and time! Let's Goooooooooo

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants