Skip to content

Make tree shaking possible

Compare
Choose a tag to compare
@Amphiluke Amphiluke released this 04 Nov 09:24
· 28 commits to master since this release

Make tree shaking possible for potprox when it’s used as an ES module.

⚠️ This release introduces breaking changes:

  • The module doesn’t provide the default export anymore, so you will need to import it either this way:
    import * as potprox from "./dist/potprox.min.mjs";
    or more selectively (which, BTW, makes tree shaking possible):
    import {Morse, Rydberg} from "./dist/potprox.min.mjs";
  • The potprox.utils object was removed. Its methods (points and rSqr) are now the methods of a potential instance.