Skip to content

Commit

Permalink
feat: only publish esm
Browse files Browse the repository at this point in the history
  • Loading branch information
thebuilder committed Jul 29, 2024
1 parent 6597b58 commit 6eceb29
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 18 deletions.
22 changes: 5 additions & 17 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,29 +9,17 @@
"url": "https://github.com/charlie-tango/hooks.git"
},
"source": "src/index.ts",
"main": "dist/index.cjs",
"main": "dist/index.js",
"module": "dist/index.js",
"types": "dist/index.d.ts",
"exports": {
".": {
"import": {
"types": "./dist/index.d.ts",
"default": "./dist/index.js"
},
"require": {
"types": "./dist/index.d.cts",
"default": "./dist/index.cjs"
}
"types": "./dist/index.d.ts",
"default": "./dist/index.js"
},
"./*": {
"import": {
"types": "./dist/hooks/*.d.ts",
"default": "./dist/hooks/*.js"
},
"require": {
"types": "./dist/hooks/*.d.ts",
"default": "./dist/hooks/*.cjs"
}
"types": "./dist/hooks/*.d.ts",
"default": "./dist/hooks/*.js"
}
},
"scripts": {
Expand Down
2 changes: 1 addition & 1 deletion tsup.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export default defineConfig({
dts: true,
clean: true,
external: ["react", "react-dom"],
format: ["esm", "cjs"],
format: ["esm"],
entry: entries,
outDir: "dist",
treeshake: true,
Expand Down

0 comments on commit 6eceb29

Please sign in to comment.