It's 2018 and the JS community is still in the midst of unifying a module standard. There currently exist three major ways for packaging/shipping JS modules:
- Browser bundles (IIFEs, UMD, Whatever)
- CommonJS modules
- ES2015 modules
Generally ES2015 modules are the "best" way to ship JS in 2018. The reasons for this come down to tree shaking and future proofing and are well discussed by others elsewhere on the internet.