Skip to content
This repository has been archived by the owner on Jul 16, 2024. It is now read-only.

Commit

Permalink
fix: use single export
Browse files Browse the repository at this point in the history
  • Loading branch information
notrab committed Mar 10, 2024
1 parent 8314ea0 commit 6ec3453
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 26 deletions.
33 changes: 9 additions & 24 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,35 +22,20 @@
"semantic-release": "semantic-release"
},
"type": "module",
"main": "dist/index.js",
"module": "dist/index.js",
"types": "dist/index.d.ts",
"exports": {
"./currency": {
"types": "./dist/currency.d.ts",
".": {
"types": "./dist/index.d.ts",
"import": {
"node": "./dist/currency.js",
"default": "./dist/currency.js"
"node": "./dist/index.js",
"default": "./dist/index.js"
},
"require": {
"node": "./dist/currency.cjs",
"default": "./dist/currency.cjs"
"node": "./dist/index.cjs",
"default": "./dist/index.cjs"
}
},
"./number": {
"import": "./dist/number.js",
"require": "./dist/number.cjs",
"types": "./dist/number.d.ts",
"default": "./dist/number.js"
},
"./time": {
"import": "./dist/time.js",
"require": "./dist/time.cjs",
"types": "./dist/time.d.ts",
"default": "./dist/time.js"
},
"./price": {
"import": "./dist/price.js",
"require": "./dist/price.cjs",
"types": "./dist/price.d.ts",
"default": "./dist/price.js"
}
},
"publishConfig": {
Expand Down
4 changes: 4 additions & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
export * from "./currency";
export * from "./number";
export * from "./price";
export * from "./time";
4 changes: 2 additions & 2 deletions tsup.config.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { defineConfig } from "tsup";

export default defineConfig({
entry: ["src/**/**.ts", "!src/**/*.test.ts"],
entry: ["src/index.ts"],
splitting: true,
sourcemap: true,
sourcemap: false,
clean: true,
dts: true,
treeshake: true,
Expand Down

0 comments on commit 6ec3453

Please sign in to comment.