Skip to content

Conversation

@Fryuni
Copy link
Member

@Fryuni Fryuni commented Jun 22, 2023

Summary

Add a flag to the package.json file indicating to bundlers that the modules in this library do not have side effects. This allows better optimizations and code pruning from the any bundle using this library.

Webpack has a nice example file on how this property affects bundling and code pruning

Checklist

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules
  • I have checked my code and corrected any misspellings

@Fryuni Fryuni self-assigned this Jun 22, 2023
@Fryuni Fryuni added the maintenance Housekeeping label Jun 22, 2023
@github-actions
Copy link

👋 @Fryuni
Thanks for your contribution!
The approval and merge process is almost fully automated 🧙
Here's how it works:

  1. You open a new pull request
  2. Automated tests check the code
  3. Maintainers review the code
  4. Once approved, the PR is ready to merge.

👉 Omit the extended description
Please remove the commit body before merging the pull request.
Instead, include the pull request number in the title to provide the full context
about the change.

☝️ Lastly, the title for the commit will come from the pull request title. So please provide a descriptive title that summarizes the changes in 50 characters or less using the imperative mood.
Happy coding! 🎉

@Fryuni Fryuni changed the title Flag this library as side effect free Set this library as side effect free Jun 22, 2023
@marcospassos marcospassos merged commit 37efc6f into master Jun 26, 2023
@marcospassos marcospassos deleted the feat/side-effect-free branch June 26, 2023 12:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

maintenance Housekeeping

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants