diff --git a/packages/db-mongodb/package.json b/packages/db-mongodb/package.json index 9113471a7..595dea1f7 100644 --- a/packages/db-mongodb/package.json +++ b/packages/db-mongodb/package.json @@ -41,10 +41,23 @@ "peerDependencies": { "payload": "workspace:*" }, + "exports": { + ".": { + "import": "./src/index.ts", + "require": "./src/index.ts", + "types": "./src/index.ts" + } + }, "publishConfig": { "main": "./dist/index.js", - "registry": "https://registry.npmjs.org/", - "types": "./dist/index.d.ts" + "types": "./dist/index.d.ts", + "exports": { + ".": { + "import": "./dist/index.ts", + "require": "./dist/index.ts", + "types": "./dist/index.d.ts" + } + } }, "files": [ "dist", diff --git a/packages/db-postgres/package.json b/packages/db-postgres/package.json index 1947de59b..8be0594ff 100644 --- a/packages/db-postgres/package.json +++ b/packages/db-postgres/package.json @@ -39,10 +39,33 @@ "peerDependencies": { "payload": "workspace:*" }, + "exports": { + ".": { + "import": "./src/index.ts", + "require": "./src/index.ts", + "types": "./src/index.ts" + }, + "./types": { + "import": "./src/types.ts", + "require": "./src/types.ts", + "types": "./src/types.ts" + } + }, "publishConfig": { "main": "./dist/index.js", - "registry": "https://registry.npmjs.org/", - "types": "./dist/index.d.ts" + "types": "./dist/index.d.ts", + "exports": { + ".": { + "import": "./dist/index.js", + "require": "./dist/index.js", + "types": "./dist/index.d.ts" + }, + "./types": { + "import": "./dist/types.js", + "require": "./dist/types.js", + "types": "./dist/types.d.ts" + } + } }, "files": [ "dist", diff --git a/packages/graphql/package.json b/packages/graphql/package.json index cac0de40e..207a99cc5 100644 --- a/packages/graphql/package.json +++ b/packages/graphql/package.json @@ -45,8 +45,7 @@ "require": "./dist/index.js", "types": "./dist/index.d.ts" } - }, - "registry": "https://registry.npmjs.org/" + } }, "files": [ "dist" diff --git a/packages/live-preview-react/package.json b/packages/live-preview-react/package.json index fa8e0b829..a22f5a8e5 100644 --- a/packages/live-preview-react/package.json +++ b/packages/live-preview-react/package.json @@ -30,8 +30,8 @@ }, "exports": { ".": { - "default": "./src/index.ts", - "types": "./src/index.ts" + "types": "./src/index.ts", + "default": "./src/index.ts" } }, "publishConfig": { diff --git a/packages/live-preview/package.json b/packages/live-preview/package.json index 2b882302f..afc78c5de 100644 --- a/packages/live-preview/package.json +++ b/packages/live-preview/package.json @@ -23,8 +23,8 @@ }, "exports": { ".": { - "default": "./src/index.ts", - "types": "./src/index.ts" + "types": "./src/index.ts", + "default": "./src/index.ts" } }, "publishConfig": { diff --git a/packages/plugin-cloud-storage/package.json b/packages/plugin-cloud-storage/package.json index 76b0d3a4b..7b88c8610 100644 --- a/packages/plugin-cloud-storage/package.json +++ b/packages/plugin-cloud-storage/package.json @@ -2,8 +2,8 @@ "name": "@payloadcms/plugin-cloud-storage", "description": "The official cloud storage plugin for Payload CMS", "version": "3.0.0-alpha.48", - "main": "dist/index.js", - "types": "dist/index.d.ts", + "main": "./src/index.ts", + "types": "./src/index.ts", "type": "module", "license": "MIT", "scripts": { @@ -62,15 +62,15 @@ "require": "./src/index.ts", "types": "./src/index.ts" }, + "./types": { + "import": "./src/types.ts", + "require": "./src/types.ts", + "types": "./src/types.ts" + }, "./*": { "import": "./src/exports/*.ts", "require": "./src/exports/*.ts", "types": "./src/exports/*.ts" - }, - "./dist/*": { - "import": "./src/*.ts", - "require": "./src/*.ts", - "types": "./src/*.ts" } }, "publishConfig": { @@ -80,15 +80,15 @@ "require": "./dist/index.js", "types": "./dist/index.d.ts" }, + "./types": { + "import": "./dist/types.js", + "require": "./dist/types.js", + "types": "./dist/types.d.ts" + }, "./*": { "import": "./dist/exports/*.js", "require": "./dist/exports/*.js", "types": "./dist/exports/*.d.ts" - }, - "./dist/*": { - "import": "./dist/*.js", - "require": "./dist/*.js", - "types": "./dist/*.d.ts" } }, "main": "./dist/index.js", diff --git a/packages/plugin-cloud/package.json b/packages/plugin-cloud/package.json index d9098c192..1c059a048 100644 --- a/packages/plugin-cloud/package.json +++ b/packages/plugin-cloud/package.json @@ -2,8 +2,8 @@ "name": "@payloadcms/plugin-cloud", "description": "The official Payload Cloud plugin", "version": "3.0.0-alpha.48", - "main": "dist/index.js", - "types": "dist/index.d.ts", + "main": "./src/index.ts", + "types": "./src/index.ts", "license": "MIT", "type": "module", "scripts": { @@ -32,6 +32,24 @@ "payload": "workspace:*", "ts-jest": "^29.1.0" }, + "exports": { + ".": { + "import": "./src/index.ts", + "require": "./src/index.ts", + "types": "./src/index.ts" + } + }, + "publishConfig": { + "main": "./dist/index.js", + "types": "./dist/index.d.ts", + "exports": { + ".": { + "import": "./dist/index.js", + "require": "./dist/index.js", + "types": "./dist/index.js" + } + } + }, "files": [ "dist" ] diff --git a/packages/plugin-form-builder/package.json b/packages/plugin-form-builder/package.json index 1241bd1e6..c94169e95 100644 --- a/packages/plugin-form-builder/package.json +++ b/packages/plugin-form-builder/package.json @@ -4,8 +4,8 @@ "version": "1.2.1", "homepage:": "https://payloadcms.com", "repository": "git@github.com:payloadcms/plugin-form-builder.git", - "main": "dist/index.js", - "types": "dist/index.d.ts", + "main": "./src/index.ts", + "types": "./src/index.ts", "license": "MIT", "author": "dev@payloadcms.com", "type": "module", @@ -38,6 +38,24 @@ "react": "^18.0.0", "ts-node": "10.9.1" }, + "exports": { + ".": { + "import": "./src/index.ts", + "require": "./src/index.ts", + "types": "./src/index.ts" + } + }, + "publishConfig": { + "main": "./dist/index.js", + "types": "./dist/index.d.ts", + "exports": { + ".": { + "import": "./dist/index.js", + "require": "./dist/index.js", + "types": "./dist/index.d.ts" + } + } + }, "files": [ "dist", "types.js", diff --git a/packages/plugin-nested-docs/package.json b/packages/plugin-nested-docs/package.json index a73351f8e..dcff4d3be 100644 --- a/packages/plugin-nested-docs/package.json +++ b/packages/plugin-nested-docs/package.json @@ -26,15 +26,21 @@ }, "exports": { ".": { - "default": "./src/index.ts", + "import": "./src/index.ts", + "require": "./src/index.ts", "types": "./src/index.ts" } }, "publishConfig": { - "exports": null, "main": "./dist/index.js", - "registry": "https://registry.npmjs.org/", - "types": "./dist/index.d.ts" + "types": "./dist/index.d.ts", + "exports": { + ".": { + "import": "./dist/index.js", + "require": "./dist/index.js", + "types": "./dist/index.d.ts" + } + } }, "files": [ "dist", diff --git a/packages/plugin-redirects/package.json b/packages/plugin-redirects/package.json index 34ec2a96c..71cf64d79 100644 --- a/packages/plugin-redirects/package.json +++ b/packages/plugin-redirects/package.json @@ -4,8 +4,8 @@ "homepage:": "https://payloadcms.com", "repository": "git@github.com:payloadcms/plugin-redirects.git", "description": "Redirects plugin for Payload", - "main": "dist/index.js", - "types": "dist/index.d.ts", + "main": "./src/index.ts", + "types": "./src/index.ts", "type": "module", "scripts": { "build": "pnpm copyfiles && pnpm build:swc && pnpm build:types", @@ -38,15 +38,21 @@ }, "exports": { ".": { - "default": "./src/index.ts", + "import": "./src/index.ts", + "require": "./src/index.ts", "types": "./src/index.ts" } }, "publishConfig": { - "exports": null, "main": "./dist/index.js", - "registry": "https://registry.npmjs.org/", - "types": "./dist/index.d.ts" + "types": "./dist/index.d.ts", + "exports": { + ".": { + "import": "./dist/index.js", + "require": "./dist/index.js", + "types": "./dist/index.d.ts" + } + } }, "files": [ "dist", diff --git a/packages/plugin-redirects/src/index.ts b/packages/plugin-redirects/src/index.ts index ac374b572..6e54af264 100644 --- a/packages/plugin-redirects/src/index.ts +++ b/packages/plugin-redirects/src/index.ts @@ -79,4 +79,4 @@ const redirects = ], }) -export default redirects +export { redirects } diff --git a/packages/plugin-search/package.json b/packages/plugin-search/package.json index 822d80be4..2b214d6bc 100644 --- a/packages/plugin-search/package.json +++ b/packages/plugin-search/package.json @@ -43,8 +43,8 @@ }, "exports": { ".": { - "default": "./src/index.ts", - "types": "./src/index.ts" + "types": "./src/index.ts", + "default": "./src/index.ts" } }, "publishConfig": { diff --git a/packages/plugin-sentry/package.json b/packages/plugin-sentry/package.json index 6202720d7..19453dbac 100644 --- a/packages/plugin-sentry/package.json +++ b/packages/plugin-sentry/package.json @@ -4,8 +4,8 @@ "homepage:": "https://payloadcms.com", "repository": "git@github.com:payloadcms/plugin-sentry.git", "description": "Sentry plugin for Payload", - "main": "dist/index.js", - "types": "dist/index.d.ts", + "main": "./src/index.ts", + "types": "./src/index.ts", "type": "module", "scripts": { "build": "echo \"Build temporarily disabled.\" && exit 0", @@ -50,5 +50,23 @@ "payload": "workspace:*", "ts-jest": "^29.1.0", "webpack": "^5.78.0" + }, + "exports": { + ".": { + "import": "./src/index.ts", + "require": "./src/index.ts", + "types": "./src/index.ts" + } + }, + "publishConfig": { + "main": "./dist/index.js", + "types": "./dist/index.d.ts", + "exports": { + ".": { + "import": "./dist/index.js", + "require": "./dist/index.js", + "types": "./dist/index.d.ts" + } + } } } diff --git a/packages/plugin-seo/package.json b/packages/plugin-seo/package.json index 5c656d970..d480b4c83 100644 --- a/packages/plugin-seo/package.json +++ b/packages/plugin-seo/package.json @@ -4,8 +4,8 @@ "homepage:": "https://payloadcms.com", "repository": "git@github.com:payloadcms/plugin-seo.git", "description": "SEO plugin for Payload", - "main": "./dist/index.js", - "types": "./dist/index.d.ts", + "main": "./src/index.tsx", + "types": "./src/index.tsx", "type": "module", "scripts": { "build": "pnpm copyfiles && pnpm build:swc && pnpm build:types", @@ -44,8 +44,9 @@ }, "exports": { ".": { - "default": "./src/index.ts", - "types": "./src/index.ts" + "import": "./src/index.tsx", + "types": "./src/index.tsx", + "default": "./src/index.tsx" } }, "publishConfig": { diff --git a/packages/plugin-stripe/package.json b/packages/plugin-stripe/package.json index f7a5a28d4..423741926 100644 --- a/packages/plugin-stripe/package.json +++ b/packages/plugin-stripe/package.json @@ -4,8 +4,8 @@ "homepage:": "https://payloadcms.com", "repository": "git@github.com:payloadcms/plugin-stripe.git", "description": "Stripe plugin for Payload", - "main": "dist/index.js", - "types": "dist/index.d.ts", + "main": "./src/index.ts", + "types": "./src/index.ts", "type": "module", "scripts": { "build": "echo \"Build temporarily disabled.\" && exit 0", @@ -48,6 +48,24 @@ "react": "^18.0.0", "webpack": "^5.78.0" }, + "exports": { + ".": { + "import": "./src/index.ts", + "require": "./src/index.ts", + "types": "./src/index.ts" + } + }, + "publishConfig": { + "main": "./dist/index.js", + "types": "./dist/index.d.ts", + "exports": { + ".": { + "import": "./dist/index.js", + "require": "./dist/index.js", + "types": "./dist/index.d.ts" + } + } + }, "files": [ "dist", "types.js", diff --git a/packages/richtext-slate/package.json b/packages/richtext-slate/package.json index 161457c1a..564f96dc4 100644 --- a/packages/richtext-slate/package.json +++ b/packages/richtext-slate/package.json @@ -6,8 +6,8 @@ "license": "MIT", "homepage": "https://payloadcms.com", "author": "Payload CMS, Inc.", - "main": "./src/index.ts", - "types": "./dist/index.d.ts", + "main": "./src/index.tsx", + "types": "./src/index.tsx", "type": "module", "scripts": { "build": "pnpm copyfiles && pnpm build:swc && pnpm build:types", @@ -40,18 +40,13 @@ }, "exports": { ".": { - "default": "./src/index.ts", - "types": "./src/index.ts" + "import": "./src/index.tsx", + "require": "./src/index.tsx", + "types": "./src/index.tsx" } }, "publishConfig": { - "exports": { - ".": { - "import": "./dist/index.js", - "require": "./dist/index.js", - "types": "./dist/index.d.ts" - } - }, + "exports": null, "main": "./dist/index.js", "registry": "https://registry.npmjs.org/", "types": "./dist/index.d.ts"