zerodevx / svelte-img

High-performance responsive/progressive images for SvelteKit
https://zerodevx.github.io/svelte-img/
ISC License
300 stars 11 forks source link

Re-export instead of import and then export to optimize tree shaking #28

Closed phaberest closed 11 months ago

phaberest commented 11 months ago

Hey Jason! 🙌🏻

This should help avoiding the issue I encountered in #27

NB: I could not run an npm run test as my connection right now is terrible and I need to download playwright data

zerodevx commented 11 months ago

Hey, thanks for your PR - but I'm not sure if single-line re-export is any different from an import-export... afaik they are semantically equivalent? 🤔

Both syntax should be tree-shaken by bundlers.

zerodevx commented 11 months ago

I just tested with your changes in place, but seems like FxParallax is still included in the build. Trying to figure out what's going on. 🤷

zerodevx commented 11 months ago

This should be fixed with #29 - thanks!

phaberest commented 11 months ago

Awesome, well done! 🙌🏻 (sorry, fighting with the worst connection ever these days and have just read)