You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit e806b93
Browse filesBrowse the repository at this point in the historyBrowse files
Copy file name to clipboardExpand all lines: README.md
+5-7Lines changed: 5 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -634,15 +634,13 @@ Note that `JSON` cases use `Buffer` to emulate I/O where a JavaScript string mus
634
634
635
635
### NPM / npmjs.com
636
636
637
-
The NPM package distributed in npmjs.com includes both ES2015+ and ES5 files:
637
+
The npm package provides three ES2020-targeted builds:
638
638
639
-
*`dist/` is compiled into ES2020 with CommomJS, provided for NodeJS v10
640
-
*`dist.umd/` is compiled into ES5 with UMD
641
-
*`dist.umd/msgpack.min.js` - the minified file
642
-
*`dist.umd/msgpack.js` - the non-minified file
643
-
*`dist.esm/` is compiled into ES2020 with ES modules, provided for webpack-like bundlers and NodeJS's ESM-mode
639
+
*`dist.cjs/index.cjs`: CommonJS entry point for Node.js `require()`, with `index.d.cts` declarations.
640
+
*`dist.esm/index.mjs`: ES module entry point for Node.js `import` and compatible bundlers, with `index.d.mts` declarations.
641
+
*`dist.umd/msgpack.min.js` and `dist.umd/msgpack.js`: minified and unminified browser bundles, respectively.
644
642
645
-
If you use NodeJS and/or webpack, their module resolvers use the suitable one automatically.
643
+
Node.js requires version 18 or later. Use the package name `@msgpack/msgpack` rather than a path into `dist.cjs/`or `dist.esm/`; the package export map selects the appropriate entry point.
0 commit comments