Fix model overwrite error when plugin is initialized multiple times

- Filter out existing collections with same slugs before adding plugin collections
- Prevents 'Cannot overwrite model once compiled' errors in Next.js apps
- Fixes issue during hot reload and multiple getPayload() calls
- Bump version to 0.1.19
This commit is contained in:
2025-09-14 10:22:34 +02:00
parent c7db65980a
commit 347cd33e13
3 changed files with 12 additions and 2 deletions

View File

@@ -1,6 +1,6 @@
{
"name": "@xtr-dev/payload-mailing",
"version": "0.1.18",
"version": "0.1.19",
"description": "Template-based email system with scheduling and job processing for PayloadCMS",
"type": "module",
"main": "dist/index.js",