Skip to content

Commit ba1c047

Browse files
authored
chore: enable unpkg alias again (#701)
1 parent 3488411 commit ba1c047

2 files changed

Lines changed: 6 additions & 1 deletion

File tree

.changeset/tall-paws-end.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'microbundle': patch
3+
---
4+
5+
re-enable unpkg alias for umd bundles as described in the readme

src/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -279,7 +279,7 @@ function getMain({ options, entry, format }) {
279279
);
280280
mainsByFormat.cjs = replaceName(pkg['cjs:main'] || 'x.js', mainNoExtension);
281281
mainsByFormat.umd = replaceName(
282-
pkg['umd:main'] || 'x.umd.js',
282+
pkg['umd:main'] || pkg.unpkg || 'x.umd.js',
283283
mainNoExtension,
284284
);
285285

0 commit comments

Comments
 (0)