diff --git a/.changeset/hot-hornets-call.md b/.changeset/hot-hornets-call.md new file mode 100644 index 0000000..d8dc290 --- /dev/null +++ b/.changeset/hot-hornets-call.md @@ -0,0 +1,5 @@ +--- +"single-spa-react": patch +--- + +Update the exports in package.json diff --git a/.changeset/large-queens-poke.md b/.changeset/large-queens-poke.md new file mode 100644 index 0000000..f3aeef1 --- /dev/null +++ b/.changeset/large-queens-poke.md @@ -0,0 +1,5 @@ +--- +"single-spa-react": minor +--- + +Exports Typescript definitions using the exports property in package.json diff --git a/package.json b/package.json index dc18257..f71d330 100644 --- a/package.json +++ b/package.json @@ -8,12 +8,24 @@ "exports": { "./package.json": "./package.json", ".": { - "import": "./lib/esm/single-spa-react.js", - "require": "./lib/cjs/single-spa-react.cjs" + "import": { + "types": "./types/single-spa-react.d.ts", + "default": "./lib/esm/single-spa-react.js" + }, + "require": { + "types": "./types/single-spa-react.d.ts", + "default": "./lib/cjs/single-spa-react.cjs" + } }, "./parcel": { - "import": "./lib/esm/parcel.js", - "require": "./lib/cjs/parcel.cjs" + "import": { + "types": "./parcel/index.d.ts", + "default": "./lib/esm/parcel.js" + }, + "require": { + "types": "./parcel/index.d.ts", + "default": "./lib/cjs/parcel.cjs" + } } }, "files": [