Skip to content

Commit 15c940d

Browse files
authored
Merge pull request #935 from soluble-io/dsn-parser-preference-esm
[dsn-parser] give precedence to esm build
2 parents 044af65 + 7848937 commit 15c940d

File tree

2 files changed

+12
-1
lines changed

2 files changed

+12
-1
lines changed

.changeset/beige-actors-hang.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
---
2+
"@soluble/dsn-parser": patch
3+
---
4+
5+
Give precedence to esm
6+
7+
Ensure the "module" condition comes before the "require" condition. Due to the way conditions are matched top-to-bottom,
8+
the "module" condition (used in bundler contexts only) must come before a "require" condition,
9+
so it has the opportunity to take precedence.
10+
11+
See [publint](https://publint.dev/rules#exports_module_should_precede_require)

packages/dsn-parser/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,8 @@
3232
"exports": {
3333
".": {
3434
"types": "./dist/index.d.ts",
35-
"require": "./dist/index.js",
3635
"module": "./dist/index.mjs",
36+
"require": "./dist/index.js",
3737
"import": "./dist/index.mjs",
3838
"browser": "./dist/index.mjs",
3939
"default": "./dist/index.js"

0 commit comments

Comments
 (0)