Make sure to provide side effects free bundle
weblogixx opened this issue · 1 comments
weblogixx commented
It should be checked if it is possible to provide a side effects free package by adding hints for bundlers (e.g. webpack) that make it possible to better tree shake the package.
Proposed solution:
- Get a list of all files that have side effects (e.g. https://github.com/SICKAG/collage/blob/main/src/elements/fragment-element.ts#L84)
- Add an entry
sideEffects
with a list of all files containing such effects
Further Information:
- https://github.com/SICKAG/collage/blob/main/src/elements/fragment-element.ts#L84
- https://sgom.es/posts/2020-06-15-everything-you-never-wanted-to-know-about-side-effects/
If this feature is considered, I would be happy to provide a pull request for this feature.
WanjaTschuorSICKAG commented
Hey @weblogixx
I would be happy to geht a pullrequest in that issue, if youbare still interested.