Skip to content

Commit 63508a5

Browse files
authored
fix(typebox-validator): Fix @hono/typebox-validator, when imported as esm, transiently importing typebox as cjs (#942)
1 parent 6691c0e commit 63508a5

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

.changeset/purple-weeks-cross.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@hono/typebox-validator': patch
3+
---
4+
5+
Fix transiently importing typebox as cjs even when typebox-validator imported as esm

packages/typebox-validator/package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
"scripts": {
1212
"test": "jest",
1313
"build:cjs": "tsc -p tsconfig.cjs.json",
14-
"build:esm": "tsc -p tsconfig.esm.json",
14+
"build:esm": "tsc -p tsconfig.esm.json && echo '{\"type\": \"module\"}' > dist/esm/package.json",
1515
"build": "rimraf dist && yarn build:cjs && yarn build:esm",
1616
"prerelease": "yarn build && yarn test",
1717
"release": "yarn publish"
@@ -36,4 +36,4 @@
3636
"jest": "^29.7.0",
3737
"rimraf": "^5.0.5"
3838
}
39-
}
39+
}

0 commit comments

Comments
 (0)