You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
So there is a big discussion about how self executing functions or side effects are being shaked off when, for example, you directly import one poly fill.
Imagine the following scenario:
App A includes a component from module M.
Module M imports one of your polyfills P.
When webpack compiles A, as your module has no sideEffects in package.json, it simply thinks that P is dead code.
Well, the sideEffects flag allows to opt-in for side-effect-free mode (or partial side-effect-free mode when specifying some paths rather than false). If we module does not declare it, it is the same than declaring sideEffects: true. So this is already working that way.
Hello,
So there is a big discussion about how self executing functions or side effects are being shaked off when, for example, you directly import one poly fill.
Imagine the following scenario:
App A includes a component from module M.
Module M imports one of your polyfills P.
When webpack compiles A, as your module has no sideEffects in package.json, it simply thinks that P is dead code.
(A nice discussion can be followed at : webpack/webpack#6571)
What do you think of adding sideEffects to this library package.json?
Thank you!
The text was updated successfully, but these errors were encountered: