Skip to content

Commit

Permalink
fix: reprioritize browser export
Browse files Browse the repository at this point in the history
The `browser` field needs to be listed first otherwise one of `require` or `import` will match even with a browser target.

fixes #333
  • Loading branch information
jsiddiqui authored and niieani committed Nov 7, 2020
1 parent 6e3d328 commit 8c8152a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions package.json
Expand Up @@ -27,9 +27,9 @@
"module": "esm/index.js",
"exports": {
".": {
"browser": "./dist/hashids.min.js",

This comment has been minimized.

Copy link
@TrySound

TrySound Nov 22, 2020

Contributor

I think it's better be removed as not esm. I missed it in my PR

This comment has been minimized.

Copy link
@niieani

niieani Dec 2, 2020

Owner

True. Wanna submit a PR?

This comment has been minimized.

Copy link
@TrySound

TrySound Dec 2, 2020

Contributor
"import": "./esm/index.js",
"require": "./cjs/index.js",
"browser": "./dist/hashids.min.js"
"require": "./cjs/index.js"
},
"./cjs": {
"require": "./cjs/index.js"
Expand Down

0 comments on commit 8c8152a

Please sign in to comment.