juliangarnier / anime

JavaScript animation engine
https://animejs.com
MIT License
50.4k stars 3.68k forks source link

There are non-trivial differences between anime.js and anime.min.js. #885

Closed BawdyInkSlinger closed 8 months ago

BawdyInkSlinger commented 8 months ago

Describe the bug There are non-trivial differences between anime.js and anime.min.js.

To Reproduce

  1. If you search for "module" in anime.js, you will find one result, used at the end of the file: module.exports = anime;
  2. If you search for "module" in anime.min.js, you will find two results, used at the beginning of the file: !function(n,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):n.anime=e()}

Expected behavior I would expect anime.min.js to be a minimized version of anime.js, but there is also a difference in functionality.

Why this matters If anime.min.js isn't behaving as expected, one should be able to look at anime.js to troubleshoot their issue. But there are differences between the two may prevent comparisons between the two.

Additional context

  1. I'm referring to the files in the release of v3.2.2
  2. This might be related to this closed issue: https://github.com/juliangarnier/anime/issues/869
BawdyInkSlinger commented 8 months ago

Apologies. I'm not too familiar with the norms of the JavaScript ecosystem. After asking around, I learned that this is standard behavior.