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

Reduce bundle size with SWC #117

Draft
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

tripodsgames
Copy link

Hello, I conducted some tests using SWC to reduce the file sizes and potentially improve the performance of this library.

Changes:

  • Instead of publishing the "libs" folder, we now publish the "dist" folder.
  • The TypeScript file is copied as soon as the build is finished, also to the "dist" folder.
  • The examples and tests point to the "dist" folder and require the build to be done beforehand (npm run build).
  • Currently, it is configured to export the maps (perhaps it's better to deactivate).

I would like to discuss the changes.

@jkyberneees
Copy link
Collaborator

Hi @tripodsgames, thanks for contributing to the project. What is the size reduction and performance improvements you are actually realizing after this minification step? Can you elaborate with data points here?

My main concern is how it might impact developers used to reading the code before use. Looking forward to more details from you.

Regards

@tripodsgames
Copy link
Author

tripodsgames commented Aug 5, 2023

About the readability of the code, I believe this is not a problem, the code in the repository will still be the same, only the code published in NPM will be different.

About the data, I will collect them and publish them here.

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