Skip to content

Commit

Permalink
Merge pull request #25 from hopinc/fix-node-esm
Browse files Browse the repository at this point in the history
  • Loading branch information
alii authored Oct 3, 2022
2 parents 43f0a3e + fac0509 commit 173641c
Show file tree
Hide file tree
Showing 5 changed files with 31 additions and 5 deletions.
5 changes: 5 additions & 0 deletions .changeset/early-countries-drum.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@onehop/js': patch
---

fix importing @onehop/js in Node in ESM environments (conditional exports)
5 changes: 4 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,10 @@
"module": "./dist/index.js",
"exports": {
".": {
"node": "./dist/node/index.js",
"node": {
"import": "./dist/node/index.js",
"require": "./dist/node/index.cjs"
},
"browser": "./dist/index.js",
"import": "./dist/index.js",
"require": "./dist/index.cjs"
Expand Down
7 changes: 7 additions & 0 deletions prettier/.prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
.next
dist
build
out
node_modules
.yarn
.git
11 changes: 11 additions & 0 deletions prettier/.prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"$schema": "http://json.schemastore.org/prettierrc",
"singleQuote": true,
"semi": true,
"printWidth": 120,
"trailingComma": "all",
"arrowParens": "avoid",
"bracketSpacing": false,
"useTabs": true,
"quoteProps": "consistent"
}
8 changes: 4 additions & 4 deletions utils/zod/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"main": "../../dist/utils/zod/index.js",
"module": "../../dist/utils/zod/index.mjs",
"types": "../../dist/utils/zod/index.d.ts"
}
"main": "../../dist/utils/zod/index.js",
"module": "../../dist/utils/zod/index.mjs",
"types": "../../dist/utils/zod/index.d.ts"
}

1 comment on commit 173641c

@vercel
Copy link

@vercel vercel bot commented on 173641c Oct 3, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

hop-js – ./

hop-js.vercel.app
hop-js-onehop.vercel.app
hop-js-git-master-onehop.vercel.app
js.hop.io

Please sign in to comment.