browserify / common-shakeify

browserify tree shaking plugin using `common-shake`
https://www.npmjs.com/package/common-shakeify
MIT License
105 stars 18 forks source link

fix for when getSideEffects loop gets stuck #40

Closed ghost closed 2 years ago

ghost commented 2 years ago

When I tried updating tinyify to use this module, it got stuck in a loop for getSideEffects() with dir==='/'. This patch checks that the previous path isn't the same as the current path for an additional check so it doesn't get stuck in a loop.