From 1038f03d4f3c856902201de75f5765fc38dfc84a Mon Sep 17 00:00:00 2001 From: Pooya Parsa Date: Wed, 30 Aug 2023 20:00:09 +0200 Subject: [PATCH] build: add new ts type exports --- babel-plugin.d.ts | 1 + loader.d.ts | 2 +- package.json | 44 ++++++++++++++++++++++++++++++++------------ transform.d.ts | 1 + 4 files changed, 35 insertions(+), 13 deletions(-) create mode 100644 babel-plugin.d.ts create mode 100644 transform.d.ts diff --git a/babel-plugin.d.ts b/babel-plugin.d.ts new file mode 100644 index 0000000..39fbb4c --- /dev/null +++ b/babel-plugin.d.ts @@ -0,0 +1 @@ +export * from './dist/loader/babel' diff --git a/loader.d.ts b/loader.d.ts index 2d9e12b..10a2eff 100644 --- a/loader.d.ts +++ b/loader.d.ts @@ -1 +1 @@ -export * from "./dist/loader"; +export * from "./dist/loader/loader"; diff --git a/package.json b/package.json index 586c44d..7c58a37 100644 --- a/package.json +++ b/package.json @@ -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", diff --git a/transform.d.ts b/transform.d.ts new file mode 100644 index 0000000..618d471 --- /dev/null +++ b/transform.d.ts @@ -0,0 +1 @@ +export * from './dist/loader/transform'