Skip to content

Commit

Permalink
Export .d.ts for ESM build separately (#12)
Browse files Browse the repository at this point in the history
  • Loading branch information
svsool committed Apr 20, 2023
1 parent 84c840b commit 3315c30
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
10 changes: 8 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,14 @@
"main": "./lib/cjs/axiosBetterStacktrace.js",
"exports": {
".": {
"import": "./lib/esm/axiosBetterStacktrace.js",
"require": "./lib/cjs/axiosBetterStacktrace.js"
"import": {
"types": "./lib/esm/axiosBetterStacktrace.d.ts",
"default": "./lib/esm/axiosBetterStacktrace.js"
},
"require": {
"types": "./lib/cjs/axiosBetterStacktrace.d.ts",
"default": "./lib/cjs/axiosBetterStacktrace.js"
}
}
},
"types": "lib/cjs/axiosBetterStacktrace.d.ts",
Expand Down
1 change: 0 additions & 1 deletion tsconfig.cjs.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
{
"extends": "./tsconfig.json",
"compilerOptions": {
"declaration": true,
"module": "commonjs",
"outDir": "./lib/cjs"
}
Expand Down
1 change: 1 addition & 0 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
"esModuleInterop": true,
"skipLibCheck": true,
"inlineSourceMap": true,
"declaration": true,
},
"include": ["src"],
"exclude": ["node_modules", "**/*.spec.ts"]
Expand Down

0 comments on commit 3315c30

Please sign in to comment.