Skip to content

Commit

Permalink
feat: precedence for esm build
Browse files Browse the repository at this point in the history
  • Loading branch information
belgattitude committed Jul 16, 2023
1 parent 242ab19 commit 7848937
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
11 changes: 11 additions & 0 deletions .changeset/beige-actors-hang.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
"@soluble/dsn-parser": patch
---

Give precedence to esm

Ensure the "module" condition comes before the "require" condition. Due to the way conditions are matched top-to-bottom,
the "module" condition (used in bundler contexts only) must come before a "require" condition,
so it has the opportunity to take precedence.

See [publint](https://publint.dev/rules#exports_module_should_precede_require)
2 changes: 1 addition & 1 deletion packages/dsn-parser/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@
"exports": {
".": {
"types": "./dist/index.d.ts",
"require": "./dist/index.js",
"module": "./dist/index.mjs",
"require": "./dist/index.js",
"import": "./dist/index.mjs",
"browser": "./dist/index.mjs",
"default": "./dist/index.js"
Expand Down

0 comments on commit 7848937

Please sign in to comment.