From 60807dd94a493642a4cff98f9213f4f9ee332cc4 Mon Sep 17 00:00:00 2001 From: Ward Peeters Date: Sun, 16 Aug 2020 21:52:07 +0200 Subject: [PATCH] chore: enable unpkg alias again --- .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 2e41cea3..7b5fbb22 100644 --- a/src/index.js +++ b/src/index.js @@ -278,7 +278,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, );