Please read /docs/esm for full details & comparisons.
This example makes use of the native ESM loader – available in version Node 12 and later!
-
Uses native ESM via the
.mjs
file extension
This is the Node's default behavior. -
Define
import
statements with full file paths
Required by Node.js whenever ESM in use.
MIT © Luke Edwards