Reduce bundle size with SWC
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.
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
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.