From ba1c047512356e0e48911f5f037be798c5c2b9eb Mon Sep 17 00:00:00 2001 From: Ward Peeters Date: Mon, 17 Aug 2020 09:07:28 +0200 Subject: [PATCH] chore: enable unpkg alias again (#701) --- .changeset/tall-paws-end.md | 5 +++++ src/index.js | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 .changeset/tall-paws-end.md diff --git a/.changeset/tall-paws-end.md b/.changeset/tall-paws-end.md new file mode 100644 index 00000000..7640ed5d --- /dev/null +++ b/.changeset/tall-paws-end.md @@ -0,0 +1,5 @@ +--- +'microbundle': patch +--- + +re-enable unpkg alias for umd bundles as described in the readme diff --git a/src/index.js b/src/index.js index 423fc2de..87a9601f 100644 --- a/src/index.js +++ b/src/index.js @@ -279,7 +279,7 @@ function getMain({ options, entry, format }) { ); mainsByFormat.cjs = replaceName(pkg['cjs:main'] || 'x.js', mainNoExtension); mainsByFormat.umd = replaceName( - pkg['umd:main'] || 'x.umd.js', + pkg['umd:main'] || pkg.unpkg || 'x.umd.js', mainNoExtension, );