From 12b660cff7a981061eaaeca860d365a62ead6946 Mon Sep 17 00:00:00 2001 From: Jason Miller Date: Sun, 8 Nov 2020 20:25:17 -0500 Subject: [PATCH 1/4] Update the readme to recommend package exports --- README.md | 59 +++++++++++++++++++++++++++++++++---------------------- 1 file changed, 35 insertions(+), 24 deletions(-) diff --git a/README.md b/README.md index 7b8161c2..1797ca41 100644 --- a/README.md +++ b/README.md @@ -41,6 +41,7 @@ "name": "foo", // your package name "source": "src/foo.js", // your source code "main": "dist/foo.js", // where to generate the CommonJS/Node bundle + "exports": "dist/foo.modern.js", // path to the modern output (see below) "module": "dist/foo.module.js", // where to generate the ESM bundle "unpkg": "dist/foo.umd.js", // where to generate the UMD bundle (also aliased as "umd:main") "scripts": { @@ -58,14 +59,14 @@ Microbundle produces esm -In addition to the above formats, Microbundle also outputs a `modern` bundle specially designed to work in _all modern browsers_. This bundle preserves most modern JS features when compiling your code, but ensures the result runs in 90% of web browsers without needing to be transpiled. Specifically, it uses [preset-modules](https://github.com/babel/preset-modules) to target the set of browsers that support `