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

chore: update build scripts and dependencies in package.json to use tsup #1273

Closed

Conversation

jlucaso1
Copy link
Contributor

Used tsup to bundle all the code and dependencies in a single file.

Previous: baileys-v6.7.13.tgz (756.0 KiB) This depends on external packages
Now: baileys-v6.7.13.tgz (460.0 KiB) This don't need external packages because is all bundled in one file.

@whiskeysockets-bot
Copy link
Contributor

Thanks for your contribution.

The next step is to wait for review and approval to merge it to main repository

The community can help reacting with a thumb up (:thumbsup:) for approval and rocket (:rocket:) for who has tested it.

To test this PR you can run the following command below:

# NPM
npm install @whiskeysockets/baileys@jlucaso1/Baileys#feat-optimize-bundle
# YARN v2
yarn add @whiskeysockets/baileys@jlucaso1/Baileys#feat-optimize-bundle

@purpshell purpshell self-requested a review March 1, 2025 06:43
Copy link
Collaborator

@purpshell purpshell left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm opposed to this change entirely. Minification would cause us a lot of headaches with debugging and error tracking as well as having minification off means we have a 80,000 line file. I think there should be some balance that we strike later on with regards to bundle size, and I'll be dependency culling later on. Won't merge

@purpshell
Copy link
Collaborator

In addition to my previous comment, we are also intermingling ESM imports and CJS ones, so minifying would possibly break any features (like waveforms, unless the user happened to install it themselves I'm guessing?)

@purpshell purpshell closed this Mar 1, 2025
@jlucaso1
Copy link
Contributor Author

jlucaso1 commented Mar 1, 2025

Hmm. I'll think about how to improve this. Thanks for the feedback

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.

3 participants