Skip to content

Commit

Permalink
build: add new ts type exports
Browse files Browse the repository at this point in the history
  • Loading branch information
pi0 committed Aug 30, 2023
1 parent b11fabd commit 1038f03
Show file tree
Hide file tree
Showing 4 changed files with 35 additions and 13 deletions.
1 change: 1 addition & 0 deletions babel-plugin.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export * from './dist/loader/babel'
2 changes: 1 addition & 1 deletion loader.d.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export * from "./dist/loader";
export * from "./dist/loader/loader";
44 changes: 32 additions & 12 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,24 +7,44 @@
"sideEffects": false,
"exports": {
".": {
"types": "./dist/index.d.ts",
"import": "./dist/index.mjs",
"require": "./dist/index.cjs"
"import": {
"types": "./dist/index.d.mts",
"default": "./dist/index.mjs"
},
"require": {
"types": "./dist/index.d.cts",
"default": "./dist/index.d.cts"
}
},
"./babel-plugin": {
"types": "./dist/loader/babel.d.mts",
"import": "./dist/loader/babel.mjs",
"require": "./dist/loader/babel.cjs"
"import": {
"types": "./dist/loader/babel.d.mts",
"default": "./dist/loader/babel.mjs"
},
"require": {
"types": "./dist/loader/babel.d.cts",
"default": "./dist/loader/babel.cjs"
}
},
"./transform": {
"types": "./dist/loader/transform.d.mts",
"import": "./dist/loader/transform.mjs",
"require": "./dist/loader/transform.cjs"
"import": {
"types": "./dist/loader/transform.d.mts",
"default": "./dist/loader/transform.mjs"
},
"require": {
"types": "./dist/loader/transform.d.cts",
"default": "./dist/loader/transform.cjs"
}
},
"./loader": {
"types": "./dist/loader/loader.d.ts",
"import": "./dist/loader/loader.mjs",
"require": "./dist/loader/loader.cjs"
"import": {
"types": "./dist/loader/loader.d.mts",
"default": "./dist/loader/loader.mjs"
},
"require": {
"types": "./dist/loader/loader.d.cts",
"default": "./dist/loader/loader.cjs"
}
}
},
"main": "./dist/index.cjs",
Expand Down
1 change: 1 addition & 0 deletions transform.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export * from './dist/loader/transform'

0 comments on commit 1038f03

Please sign in to comment.