ESM is the best module format thanks to its simple syntax, async nature, and tree-shakeability. UMD works everywhere and usually used as a fallback in case ESM does not work CJS is synchronous and good for back end. AMD is asynchronous and good for front end.