From 44e4eca47a51df3fa12294115b34649a28d6e3cd Mon Sep 17 00:00:00 2001 From: bdbch <6538827+bdbch@users.noreply.github.com> Date: Sat, 27 Jul 2024 12:46:39 +0200 Subject: [PATCH] Shared rollup config (#5403) * add one shared rollup config * rename to baseConfig --- package-lock.json | 474 +++++++++--------- package.json | 1 + packages/core/rollup.config.js | 60 +-- .../extension-blockquote/rollup.config.js | 60 +-- packages/extension-bold/rollup.config.js | 60 +-- .../extension-bubble-menu/rollup.config.js | 60 +-- .../extension-bullet-list/rollup.config.js | 60 +-- .../rollup.config.js | 60 +-- .../rollup.config.js | 60 +-- .../extension-code-block/rollup.config.js | 60 +-- packages/extension-code/rollup.config.js | 60 +-- .../rollup.config.js | 60 +-- .../extension-collaboration/rollup.config.js | 60 +-- packages/extension-color/rollup.config.js | 60 +-- packages/extension-document/rollup.config.js | 60 +-- .../extension-dropcursor/rollup.config.js | 60 +-- .../extension-floating-menu/rollup.config.js | 60 +-- packages/extension-focus/rollup.config.js | 60 +-- .../extension-font-family/rollup.config.js | 60 +-- packages/extension-gapcursor/rollup.config.js | 60 +-- .../extension-hard-break/rollup.config.js | 60 +-- packages/extension-heading/rollup.config.js | 60 +-- packages/extension-highlight/rollup.config.js | 60 +-- packages/extension-history/rollup.config.js | 60 +-- .../rollup.config.js | 60 +-- packages/extension-image/rollup.config.js | 60 +-- packages/extension-italic/rollup.config.js | 60 +-- packages/extension-link/rollup.config.js | 60 +-- packages/extension-list-item/rollup.config.js | 60 +-- .../extension-list-keymap/rollup.config.js | 60 +-- packages/extension-mention/rollup.config.js | 60 +-- .../extension-ordered-list/rollup.config.js | 60 +-- packages/extension-paragraph/rollup.config.js | 60 +-- .../extension-placeholder/rollup.config.js | 60 +-- packages/extension-strike/rollup.config.js | 60 +-- packages/extension-subscript/rollup.config.js | 60 +-- .../extension-superscript/rollup.config.js | 60 +-- .../extension-table-cell/rollup.config.js | 60 +-- .../extension-table-header/rollup.config.js | 60 +-- packages/extension-table-row/rollup.config.js | 60 +-- packages/extension-table/rollup.config.js | 60 +-- packages/extension-task-item/rollup.config.js | 60 +-- packages/extension-task-list/rollup.config.js | 60 +-- .../extension-text-align/rollup.config.js | 60 +-- .../extension-text-style/rollup.config.js | 60 +-- packages/extension-text/rollup.config.js | 60 +-- .../extension-typography/rollup.config.js | 60 +-- packages/extension-underline/rollup.config.js | 60 +-- packages/extension-youtube/rollup.config.js | 60 +-- packages/html/rollup.config.js | 60 +-- packages/react/rollup.config.js | 60 +-- packages/starter-kit/rollup.config.js | 60 +-- packages/suggestion/rollup.config.js | 60 +-- packages/vue-2/rollup.config.js | 60 +-- packages/vue-3/rollup.config.js | 60 +-- shared/rollup-config/index.js | 62 +++ shared/rollup-config/package.json | 6 + 57 files changed, 415 insertions(+), 3308 deletions(-) create mode 100644 shared/rollup-config/index.js create mode 100644 shared/rollup-config/package.json diff --git a/package-lock.json b/package-lock.json index 913362adf..108a13a46 100644 --- a/package-lock.json +++ b/package-lock.json @@ -7,6 +7,7 @@ "name": "tiptap", "workspaces": [ "demos", + "shared/*", "packages/*" ], "devDependencies": { @@ -5088,6 +5089,10 @@ "vite": "^4.0.0" } }, + "node_modules/@tiptap-shared/rollup-config": { + "resolved": "shared/rollup-config", + "link": true + }, "node_modules/@tiptap/core": { "resolved": "packages/core", "link": true @@ -17897,159 +17902,159 @@ }, "packages/core": { "name": "@tiptap/core", - "version": "2.5.5", + "version": "2.5.7", "license": "MIT", "devDependencies": { - "@tiptap/pm": "^2.5.5" + "@tiptap/pm": "^2.5.7" }, "funding": { "type": "github", "url": "https://github.com/sponsors/ueberdosis" }, "peerDependencies": { - "@tiptap/pm": "^2.5.5" + "@tiptap/pm": "^2.5.7" } }, "packages/extension-blockquote": { "name": "@tiptap/extension-blockquote", - "version": "2.5.5", + "version": "2.5.7", "license": "MIT", "devDependencies": { - "@tiptap/core": "^2.5.5" + "@tiptap/core": "^2.5.7" }, "funding": { "type": "github", "url": "https://github.com/sponsors/ueberdosis" }, "peerDependencies": { - "@tiptap/core": "^2.5.5" + "@tiptap/core": "^2.5.7" } }, "packages/extension-bold": { "name": "@tiptap/extension-bold", - "version": "2.5.5", + "version": "2.5.7", "license": "MIT", "devDependencies": { - "@tiptap/core": "^2.5.5" + "@tiptap/core": "^2.5.7" }, "funding": { "type": "github", "url": "https://github.com/sponsors/ueberdosis" }, "peerDependencies": { - "@tiptap/core": "^2.5.5" + "@tiptap/core": "^2.5.7" } }, "packages/extension-bubble-menu": { "name": "@tiptap/extension-bubble-menu", - "version": "2.5.5", + "version": "2.5.7", "license": "MIT", "dependencies": { "tippy.js": "^6.3.7" }, "devDependencies": { - "@tiptap/core": "^2.5.5", - "@tiptap/pm": "^2.5.5" + "@tiptap/core": "^2.5.7", + "@tiptap/pm": "^2.5.7" }, "funding": { "type": "github", "url": "https://github.com/sponsors/ueberdosis" }, "peerDependencies": { - "@tiptap/core": "^2.5.5", - "@tiptap/pm": "^2.5.5" + "@tiptap/core": "^2.5.7", + "@tiptap/pm": "^2.5.7" } }, "packages/extension-bullet-list": { "name": "@tiptap/extension-bullet-list", - "version": "2.5.5", + "version": "2.5.7", "license": "MIT", "devDependencies": { - "@tiptap/core": "^2.5.5" + "@tiptap/core": "^2.5.7" }, "funding": { "type": "github", "url": "https://github.com/sponsors/ueberdosis" }, "peerDependencies": { - "@tiptap/core": "^2.5.5" + "@tiptap/core": "^2.5.7" } }, "packages/extension-character-count": { "name": "@tiptap/extension-character-count", - "version": "2.5.5", + "version": "2.5.7", "license": "MIT", "devDependencies": { - "@tiptap/core": "^2.5.5", - "@tiptap/pm": "^2.5.5" + "@tiptap/core": "^2.5.7", + "@tiptap/pm": "^2.5.7" }, "funding": { "type": "github", "url": "https://github.com/sponsors/ueberdosis" }, "peerDependencies": { - "@tiptap/core": "^2.5.5", - "@tiptap/pm": "^2.5.5" + "@tiptap/core": "^2.5.7", + "@tiptap/pm": "^2.5.7" } }, "packages/extension-code": { "name": "@tiptap/extension-code", - "version": "2.5.5", + "version": "2.5.7", "license": "MIT", "devDependencies": { - "@tiptap/core": "^2.5.5" + "@tiptap/core": "^2.5.7" }, "funding": { "type": "github", "url": "https://github.com/sponsors/ueberdosis" }, "peerDependencies": { - "@tiptap/core": "^2.5.5" + "@tiptap/core": "^2.5.7" } }, "packages/extension-code-block": { "name": "@tiptap/extension-code-block", - "version": "2.5.5", + "version": "2.5.7", "license": "MIT", "devDependencies": { - "@tiptap/core": "^2.5.5", - "@tiptap/pm": "^2.5.5" + "@tiptap/core": "^2.5.7", + "@tiptap/pm": "^2.5.7" }, "funding": { "type": "github", "url": "https://github.com/sponsors/ueberdosis" }, "peerDependencies": { - "@tiptap/core": "^2.5.5", - "@tiptap/pm": "^2.5.5" + "@tiptap/core": "^2.5.7", + "@tiptap/pm": "^2.5.7" } }, "packages/extension-code-block-lowlight": { "name": "@tiptap/extension-code-block-lowlight", - "version": "2.5.5", + "version": "2.5.7", "license": "MIT", "devDependencies": { - "@tiptap/core": "^2.5.5", - "@tiptap/extension-code-block": "^2.5.5", - "@tiptap/pm": "^2.5.5" + "@tiptap/core": "^2.5.7", + "@tiptap/extension-code-block": "^2.5.7", + "@tiptap/pm": "^2.5.7" }, "funding": { "type": "github", "url": "https://github.com/sponsors/ueberdosis" }, "peerDependencies": { - "@tiptap/core": "^2.5.5", - "@tiptap/extension-code-block": "^2.5.5", - "@tiptap/pm": "^2.5.5" + "@tiptap/core": "^2.5.7", + "@tiptap/extension-code-block": "^2.5.7", + "@tiptap/pm": "^2.5.7" } }, "packages/extension-collaboration": { "name": "@tiptap/extension-collaboration", - "version": "2.5.5", + "version": "2.5.7", "license": "MIT", "devDependencies": { - "@tiptap/core": "^2.5.5", - "@tiptap/pm": "^2.5.5", + "@tiptap/core": "^2.5.7", + "@tiptap/pm": "^2.5.7", "y-prosemirror": "^1.2.9" }, "funding": { @@ -18057,17 +18062,17 @@ "url": "https://github.com/sponsors/ueberdosis" }, "peerDependencies": { - "@tiptap/core": "^2.5.5", - "@tiptap/pm": "^2.5.5", + "@tiptap/core": "^2.5.7", + "@tiptap/pm": "^2.5.7", "y-prosemirror": "^1.2.6" } }, "packages/extension-collaboration-cursor": { "name": "@tiptap/extension-collaboration-cursor", - "version": "2.5.5", + "version": "2.5.7", "license": "MIT", "devDependencies": { - "@tiptap/core": "^2.5.5", + "@tiptap/core": "^2.5.7", "y-prosemirror": "^1.2.9" }, "funding": { @@ -18075,607 +18080,607 @@ "url": "https://github.com/sponsors/ueberdosis" }, "peerDependencies": { - "@tiptap/core": "^2.5.5", + "@tiptap/core": "^2.5.7", "y-prosemirror": "^1.2.6" } }, "packages/extension-color": { "name": "@tiptap/extension-color", - "version": "2.5.5", + "version": "2.5.7", "license": "MIT", "devDependencies": { - "@tiptap/core": "^2.5.5", - "@tiptap/extension-text-style": "^2.5.5" + "@tiptap/core": "^2.5.7", + "@tiptap/extension-text-style": "^2.5.7" }, "funding": { "type": "github", "url": "https://github.com/sponsors/ueberdosis" }, "peerDependencies": { - "@tiptap/core": "^2.5.5", - "@tiptap/extension-text-style": "^2.5.5" + "@tiptap/core": "^2.5.7", + "@tiptap/extension-text-style": "^2.5.7" } }, "packages/extension-document": { "name": "@tiptap/extension-document", - "version": "2.5.5", + "version": "2.5.7", "license": "MIT", "devDependencies": { - "@tiptap/core": "^2.5.5" + "@tiptap/core": "^2.5.7" }, "funding": { "type": "github", "url": "https://github.com/sponsors/ueberdosis" }, "peerDependencies": { - "@tiptap/core": "^2.5.5" + "@tiptap/core": "^2.5.7" } }, "packages/extension-dropcursor": { "name": "@tiptap/extension-dropcursor", - "version": "2.5.5", + "version": "2.5.7", "license": "MIT", "devDependencies": { - "@tiptap/core": "^2.5.5", - "@tiptap/pm": "^2.5.5" + "@tiptap/core": "^2.5.7", + "@tiptap/pm": "^2.5.7" }, "funding": { "type": "github", "url": "https://github.com/sponsors/ueberdosis" }, "peerDependencies": { - "@tiptap/core": "^2.5.5", - "@tiptap/pm": "^2.5.5" + "@tiptap/core": "^2.5.7", + "@tiptap/pm": "^2.5.7" } }, "packages/extension-floating-menu": { "name": "@tiptap/extension-floating-menu", - "version": "2.5.5", + "version": "2.5.7", "license": "MIT", "dependencies": { "tippy.js": "^6.3.7" }, "devDependencies": { - "@tiptap/core": "^2.5.5", - "@tiptap/pm": "^2.5.5" + "@tiptap/core": "^2.5.7", + "@tiptap/pm": "^2.5.7" }, "funding": { "type": "github", "url": "https://github.com/sponsors/ueberdosis" }, "peerDependencies": { - "@tiptap/core": "^2.5.5", - "@tiptap/pm": "^2.5.5" + "@tiptap/core": "^2.5.7", + "@tiptap/pm": "^2.5.7" } }, "packages/extension-focus": { "name": "@tiptap/extension-focus", - "version": "2.5.5", + "version": "2.5.7", "license": "MIT", "devDependencies": { - "@tiptap/core": "^2.5.5", - "@tiptap/pm": "^2.5.5" + "@tiptap/core": "^2.5.7", + "@tiptap/pm": "^2.5.7" }, "funding": { "type": "github", "url": "https://github.com/sponsors/ueberdosis" }, "peerDependencies": { - "@tiptap/core": "^2.5.5", - "@tiptap/pm": "^2.5.5" + "@tiptap/core": "^2.5.7", + "@tiptap/pm": "^2.5.7" } }, "packages/extension-font-family": { "name": "@tiptap/extension-font-family", - "version": "2.5.5", + "version": "2.5.7", "license": "MIT", "devDependencies": { - "@tiptap/core": "^2.5.5", - "@tiptap/extension-text-style": "^2.5.5" + "@tiptap/core": "^2.5.7", + "@tiptap/extension-text-style": "^2.5.7" }, "funding": { "type": "github", "url": "https://github.com/sponsors/ueberdosis" }, "peerDependencies": { - "@tiptap/core": "^2.5.5", - "@tiptap/extension-text-style": "^2.5.5" + "@tiptap/core": "^2.5.7", + "@tiptap/extension-text-style": "^2.5.7" } }, "packages/extension-gapcursor": { "name": "@tiptap/extension-gapcursor", - "version": "2.5.5", + "version": "2.5.7", "license": "MIT", "devDependencies": { - "@tiptap/core": "^2.5.5", - "@tiptap/pm": "^2.5.5" + "@tiptap/core": "^2.5.7", + "@tiptap/pm": "^2.5.7" }, "funding": { "type": "github", "url": "https://github.com/sponsors/ueberdosis" }, "peerDependencies": { - "@tiptap/core": "^2.5.5", - "@tiptap/pm": "^2.5.5" + "@tiptap/core": "^2.5.7", + "@tiptap/pm": "^2.5.7" } }, "packages/extension-hard-break": { "name": "@tiptap/extension-hard-break", - "version": "2.5.5", + "version": "2.5.7", "license": "MIT", "devDependencies": { - "@tiptap/core": "^2.5.5" + "@tiptap/core": "^2.5.7" }, "funding": { "type": "github", "url": "https://github.com/sponsors/ueberdosis" }, "peerDependencies": { - "@tiptap/core": "^2.5.5" + "@tiptap/core": "^2.5.7" } }, "packages/extension-heading": { "name": "@tiptap/extension-heading", - "version": "2.5.5", + "version": "2.5.7", "license": "MIT", "devDependencies": { - "@tiptap/core": "^2.5.5" + "@tiptap/core": "^2.5.7" }, "funding": { "type": "github", "url": "https://github.com/sponsors/ueberdosis" }, "peerDependencies": { - "@tiptap/core": "^2.5.5" + "@tiptap/core": "^2.5.7" } }, "packages/extension-highlight": { "name": "@tiptap/extension-highlight", - "version": "2.5.5", + "version": "2.5.7", "license": "MIT", "devDependencies": { - "@tiptap/core": "^2.5.5" + "@tiptap/core": "^2.5.7" }, "funding": { "type": "github", "url": "https://github.com/sponsors/ueberdosis" }, "peerDependencies": { - "@tiptap/core": "^2.5.5" + "@tiptap/core": "^2.5.7" } }, "packages/extension-history": { "name": "@tiptap/extension-history", - "version": "2.5.5", + "version": "2.5.7", "license": "MIT", "devDependencies": { - "@tiptap/core": "^2.5.5", - "@tiptap/pm": "^2.5.5" + "@tiptap/core": "^2.5.7", + "@tiptap/pm": "^2.5.7" }, "funding": { "type": "github", "url": "https://github.com/sponsors/ueberdosis" }, "peerDependencies": { - "@tiptap/core": "^2.5.5", - "@tiptap/pm": "^2.5.5" + "@tiptap/core": "^2.5.7", + "@tiptap/pm": "^2.5.7" } }, "packages/extension-horizontal-rule": { "name": "@tiptap/extension-horizontal-rule", - "version": "2.5.5", + "version": "2.5.7", "license": "MIT", "devDependencies": { - "@tiptap/core": "^2.5.5", - "@tiptap/pm": "^2.5.5" + "@tiptap/core": "^2.5.7", + "@tiptap/pm": "^2.5.7" }, "funding": { "type": "github", "url": "https://github.com/sponsors/ueberdosis" }, "peerDependencies": { - "@tiptap/core": "^2.5.5", - "@tiptap/pm": "^2.5.5" + "@tiptap/core": "^2.5.7", + "@tiptap/pm": "^2.5.7" } }, "packages/extension-image": { "name": "@tiptap/extension-image", - "version": "2.5.5", + "version": "2.5.7", "license": "MIT", "devDependencies": { - "@tiptap/core": "^2.5.5" + "@tiptap/core": "^2.5.7" }, "funding": { "type": "github", "url": "https://github.com/sponsors/ueberdosis" }, "peerDependencies": { - "@tiptap/core": "^2.5.5" + "@tiptap/core": "^2.5.7" } }, "packages/extension-italic": { "name": "@tiptap/extension-italic", - "version": "2.5.5", + "version": "2.5.7", "license": "MIT", "devDependencies": { - "@tiptap/core": "^2.5.5" + "@tiptap/core": "^2.5.7" }, "funding": { "type": "github", "url": "https://github.com/sponsors/ueberdosis" }, "peerDependencies": { - "@tiptap/core": "^2.5.5" + "@tiptap/core": "^2.5.7" } }, "packages/extension-link": { "name": "@tiptap/extension-link", - "version": "2.5.5", + "version": "2.5.7", "license": "MIT", "dependencies": { "linkifyjs": "^4.1.0" }, "devDependencies": { - "@tiptap/core": "^2.5.5", - "@tiptap/pm": "^2.5.5" + "@tiptap/core": "^2.5.7", + "@tiptap/pm": "^2.5.7" }, "funding": { "type": "github", "url": "https://github.com/sponsors/ueberdosis" }, "peerDependencies": { - "@tiptap/core": "^2.5.5", - "@tiptap/pm": "^2.5.5" + "@tiptap/core": "^2.5.7", + "@tiptap/pm": "^2.5.7" } }, "packages/extension-list-item": { "name": "@tiptap/extension-list-item", - "version": "2.5.5", + "version": "2.5.7", "license": "MIT", "devDependencies": { - "@tiptap/core": "^2.5.5" + "@tiptap/core": "^2.5.7" }, "funding": { "type": "github", "url": "https://github.com/sponsors/ueberdosis" }, "peerDependencies": { - "@tiptap/core": "^2.5.5" + "@tiptap/core": "^2.5.7" } }, "packages/extension-list-keymap": { "name": "@tiptap/extension-list-keymap", - "version": "2.5.5", + "version": "2.5.7", "license": "MIT", "devDependencies": { - "@tiptap/core": "^2.5.5" + "@tiptap/core": "^2.5.7" }, "funding": { "type": "github", "url": "https://github.com/sponsors/ueberdosis" }, "peerDependencies": { - "@tiptap/core": "^2.5.5" + "@tiptap/core": "^2.5.7" } }, "packages/extension-mention": { "name": "@tiptap/extension-mention", - "version": "2.5.5", + "version": "2.5.7", "license": "MIT", "devDependencies": { - "@tiptap/core": "^2.5.5", - "@tiptap/pm": "^2.5.5", - "@tiptap/suggestion": "^2.5.5" + "@tiptap/core": "^2.5.7", + "@tiptap/pm": "^2.5.7", + "@tiptap/suggestion": "^2.5.7" }, "funding": { "type": "github", "url": "https://github.com/sponsors/ueberdosis" }, "peerDependencies": { - "@tiptap/core": "^2.5.5", - "@tiptap/pm": "^2.5.5", - "@tiptap/suggestion": "^2.5.5" + "@tiptap/core": "^2.5.7", + "@tiptap/pm": "^2.5.7", + "@tiptap/suggestion": "^2.5.7" } }, "packages/extension-ordered-list": { "name": "@tiptap/extension-ordered-list", - "version": "2.5.5", + "version": "2.5.7", "license": "MIT", "devDependencies": { - "@tiptap/core": "^2.5.5" + "@tiptap/core": "^2.5.7" }, "funding": { "type": "github", "url": "https://github.com/sponsors/ueberdosis" }, "peerDependencies": { - "@tiptap/core": "^2.5.5" + "@tiptap/core": "^2.5.7" } }, "packages/extension-paragraph": { "name": "@tiptap/extension-paragraph", - "version": "2.5.5", + "version": "2.5.7", "license": "MIT", "devDependencies": { - "@tiptap/core": "^2.5.5" + "@tiptap/core": "^2.5.7" }, "funding": { "type": "github", "url": "https://github.com/sponsors/ueberdosis" }, "peerDependencies": { - "@tiptap/core": "^2.5.5" + "@tiptap/core": "^2.5.7" } }, "packages/extension-placeholder": { "name": "@tiptap/extension-placeholder", - "version": "2.5.5", + "version": "2.5.7", "license": "MIT", "devDependencies": { - "@tiptap/core": "^2.5.5", - "@tiptap/pm": "^2.5.5" + "@tiptap/core": "^2.5.7", + "@tiptap/pm": "^2.5.7" }, "funding": { "type": "github", "url": "https://github.com/sponsors/ueberdosis" }, "peerDependencies": { - "@tiptap/core": "^2.5.5", - "@tiptap/pm": "^2.5.5" + "@tiptap/core": "^2.5.7", + "@tiptap/pm": "^2.5.7" } }, "packages/extension-strike": { "name": "@tiptap/extension-strike", - "version": "2.5.5", + "version": "2.5.7", "license": "MIT", "devDependencies": { - "@tiptap/core": "^2.5.5" + "@tiptap/core": "^2.5.7" }, "funding": { "type": "github", "url": "https://github.com/sponsors/ueberdosis" }, "peerDependencies": { - "@tiptap/core": "^2.5.5" + "@tiptap/core": "^2.5.7" } }, "packages/extension-subscript": { "name": "@tiptap/extension-subscript", - "version": "2.5.5", + "version": "2.5.7", "license": "MIT", "devDependencies": { - "@tiptap/core": "^2.5.5" + "@tiptap/core": "^2.5.7" }, "funding": { "type": "github", "url": "https://github.com/sponsors/ueberdosis" }, "peerDependencies": { - "@tiptap/core": "^2.5.5" + "@tiptap/core": "^2.5.7" } }, "packages/extension-superscript": { "name": "@tiptap/extension-superscript", - "version": "2.5.5", + "version": "2.5.7", "license": "MIT", "devDependencies": { - "@tiptap/core": "^2.5.5" + "@tiptap/core": "^2.5.7" }, "funding": { "type": "github", "url": "https://github.com/sponsors/ueberdosis" }, "peerDependencies": { - "@tiptap/core": "^2.5.5" + "@tiptap/core": "^2.5.7" } }, "packages/extension-table": { "name": "@tiptap/extension-table", - "version": "2.5.5", + "version": "2.5.7", "license": "MIT", "devDependencies": { - "@tiptap/core": "^2.5.5", - "@tiptap/pm": "^2.5.5" + "@tiptap/core": "^2.5.7", + "@tiptap/pm": "^2.5.7" }, "funding": { "type": "github", "url": "https://github.com/sponsors/ueberdosis" }, "peerDependencies": { - "@tiptap/core": "^2.5.5", - "@tiptap/pm": "^2.5.5" + "@tiptap/core": "^2.5.7", + "@tiptap/pm": "^2.5.7" } }, "packages/extension-table-cell": { "name": "@tiptap/extension-table-cell", - "version": "2.5.5", + "version": "2.5.7", "license": "MIT", "devDependencies": { - "@tiptap/core": "^2.5.5" + "@tiptap/core": "^2.5.7" }, "funding": { "type": "github", "url": "https://github.com/sponsors/ueberdosis" }, "peerDependencies": { - "@tiptap/core": "^2.5.5" + "@tiptap/core": "^2.5.7" } }, "packages/extension-table-header": { "name": "@tiptap/extension-table-header", - "version": "2.5.5", + "version": "2.5.7", "license": "MIT", "devDependencies": { - "@tiptap/core": "^2.5.5" + "@tiptap/core": "^2.5.7" }, "funding": { "type": "github", "url": "https://github.com/sponsors/ueberdosis" }, "peerDependencies": { - "@tiptap/core": "^2.5.5" + "@tiptap/core": "^2.5.7" } }, "packages/extension-table-row": { "name": "@tiptap/extension-table-row", - "version": "2.5.5", + "version": "2.5.7", "license": "MIT", "devDependencies": { - "@tiptap/core": "^2.5.5" + "@tiptap/core": "^2.5.7" }, "funding": { "type": "github", "url": "https://github.com/sponsors/ueberdosis" }, "peerDependencies": { - "@tiptap/core": "^2.5.5" + "@tiptap/core": "^2.5.7" } }, "packages/extension-task-item": { "name": "@tiptap/extension-task-item", - "version": "2.5.5", + "version": "2.5.7", "license": "MIT", "devDependencies": { - "@tiptap/core": "^2.5.5", - "@tiptap/pm": "^2.5.5" + "@tiptap/core": "^2.5.7", + "@tiptap/pm": "^2.5.7" }, "funding": { "type": "github", "url": "https://github.com/sponsors/ueberdosis" }, "peerDependencies": { - "@tiptap/core": "^2.5.5", - "@tiptap/pm": "^2.5.5" + "@tiptap/core": "^2.5.7", + "@tiptap/pm": "^2.5.7" } }, "packages/extension-task-list": { "name": "@tiptap/extension-task-list", - "version": "2.5.5", + "version": "2.5.7", "license": "MIT", "devDependencies": { - "@tiptap/core": "^2.5.5" + "@tiptap/core": "^2.5.7" }, "funding": { "type": "github", "url": "https://github.com/sponsors/ueberdosis" }, "peerDependencies": { - "@tiptap/core": "^2.5.5" + "@tiptap/core": "^2.5.7" } }, "packages/extension-text": { "name": "@tiptap/extension-text", - "version": "2.5.5", + "version": "2.5.7", "license": "MIT", "devDependencies": { - "@tiptap/core": "^2.5.5" + "@tiptap/core": "^2.5.7" }, "funding": { "type": "github", "url": "https://github.com/sponsors/ueberdosis" }, "peerDependencies": { - "@tiptap/core": "^2.5.5" + "@tiptap/core": "^2.5.7" } }, "packages/extension-text-align": { "name": "@tiptap/extension-text-align", - "version": "2.5.5", + "version": "2.5.7", "license": "MIT", "devDependencies": { - "@tiptap/core": "^2.5.5" + "@tiptap/core": "^2.5.7" }, "funding": { "type": "github", "url": "https://github.com/sponsors/ueberdosis" }, "peerDependencies": { - "@tiptap/core": "^2.5.5" + "@tiptap/core": "^2.5.7" } }, "packages/extension-text-style": { "name": "@tiptap/extension-text-style", - "version": "2.5.5", + "version": "2.5.7", "license": "MIT", "devDependencies": { - "@tiptap/core": "^2.5.5" + "@tiptap/core": "^2.5.7" }, "funding": { "type": "github", "url": "https://github.com/sponsors/ueberdosis" }, "peerDependencies": { - "@tiptap/core": "^2.5.5" + "@tiptap/core": "^2.5.7" } }, "packages/extension-typography": { "name": "@tiptap/extension-typography", - "version": "2.5.5", + "version": "2.5.7", "license": "MIT", "devDependencies": { - "@tiptap/core": "^2.5.5" + "@tiptap/core": "^2.5.7" }, "funding": { "type": "github", "url": "https://github.com/sponsors/ueberdosis" }, "peerDependencies": { - "@tiptap/core": "^2.5.5" + "@tiptap/core": "^2.5.7" } }, "packages/extension-underline": { "name": "@tiptap/extension-underline", - "version": "2.5.5", + "version": "2.5.7", "license": "MIT", "devDependencies": { - "@tiptap/core": "^2.5.5" + "@tiptap/core": "^2.5.7" }, "funding": { "type": "github", "url": "https://github.com/sponsors/ueberdosis" }, "peerDependencies": { - "@tiptap/core": "^2.5.5" + "@tiptap/core": "^2.5.7" } }, "packages/extension-youtube": { "name": "@tiptap/extension-youtube", - "version": "2.5.5", + "version": "2.5.7", "license": "MIT", "devDependencies": { - "@tiptap/core": "^2.5.5" + "@tiptap/core": "^2.5.7" }, "funding": { "type": "github", "url": "https://github.com/sponsors/ueberdosis" }, "peerDependencies": { - "@tiptap/core": "^2.5.5" + "@tiptap/core": "^2.5.7" } }, "packages/html": { "name": "@tiptap/html", - "version": "2.5.5", + "version": "2.5.7", "license": "MIT", "dependencies": { "zeed-dom": "^0.10.9" }, "devDependencies": { - "@tiptap/core": "^2.5.5", - "@tiptap/pm": "^2.5.5" + "@tiptap/core": "^2.5.7", + "@tiptap/pm": "^2.5.7" }, "funding": { "type": "github", "url": "https://github.com/sponsors/ueberdosis" }, "peerDependencies": { - "@tiptap/core": "^2.5.5", - "@tiptap/pm": "^2.5.5" + "@tiptap/core": "^2.5.7", + "@tiptap/pm": "^2.5.7" } }, "packages/pm": { "name": "@tiptap/pm", - "version": "2.5.5", + "version": "2.5.7", "license": "MIT", "dependencies": { "prosemirror-changeset": "^2.2.1", @@ -18704,17 +18709,17 @@ }, "packages/react": { "name": "@tiptap/react", - "version": "2.5.5", + "version": "2.5.7", "license": "MIT", "dependencies": { - "@tiptap/extension-bubble-menu": "^2.5.5", - "@tiptap/extension-floating-menu": "^2.5.5", + "@tiptap/extension-bubble-menu": "^2.5.7", + "@tiptap/extension-floating-menu": "^2.5.7", "@types/use-sync-external-store": "^0.0.6", "use-sync-external-store": "^1.2.2" }, "devDependencies": { - "@tiptap/core": "^2.5.5", - "@tiptap/pm": "^2.5.5", + "@tiptap/core": "^2.5.7", + "@tiptap/pm": "^2.5.7", "@types/react": "^18.2.14", "@types/react-dom": "^18.2.6", "react": "^18.0.0", @@ -18725,36 +18730,36 @@ "url": "https://github.com/sponsors/ueberdosis" }, "peerDependencies": { - "@tiptap/core": "^2.5.5", - "@tiptap/pm": "^2.5.5", + "@tiptap/core": "^2.5.7", + "@tiptap/pm": "^2.5.7", "react": "^17.0.0 || ^18.0.0", "react-dom": "^17.0.0 || ^18.0.0" } }, "packages/starter-kit": { "name": "@tiptap/starter-kit", - "version": "2.5.5", + "version": "2.5.7", "license": "MIT", "dependencies": { - "@tiptap/core": "^2.5.5", - "@tiptap/extension-blockquote": "^2.5.5", - "@tiptap/extension-bold": "^2.5.5", - "@tiptap/extension-bullet-list": "^2.5.5", - "@tiptap/extension-code": "^2.5.5", - "@tiptap/extension-code-block": "^2.5.5", - "@tiptap/extension-document": "^2.5.5", - "@tiptap/extension-dropcursor": "^2.5.5", - "@tiptap/extension-gapcursor": "^2.5.5", - "@tiptap/extension-hard-break": "^2.5.5", - "@tiptap/extension-heading": "^2.5.5", - "@tiptap/extension-history": "^2.5.5", - "@tiptap/extension-horizontal-rule": "^2.5.5", - "@tiptap/extension-italic": "^2.5.5", - "@tiptap/extension-list-item": "^2.5.5", - "@tiptap/extension-ordered-list": "^2.5.5", - "@tiptap/extension-paragraph": "^2.5.5", - "@tiptap/extension-strike": "^2.5.5", - "@tiptap/extension-text": "^2.5.5" + "@tiptap/core": "^2.5.7", + "@tiptap/extension-blockquote": "^2.5.7", + "@tiptap/extension-bold": "^2.5.7", + "@tiptap/extension-bullet-list": "^2.5.7", + "@tiptap/extension-code": "^2.5.7", + "@tiptap/extension-code-block": "^2.5.7", + "@tiptap/extension-document": "^2.5.7", + "@tiptap/extension-dropcursor": "^2.5.7", + "@tiptap/extension-gapcursor": "^2.5.7", + "@tiptap/extension-hard-break": "^2.5.7", + "@tiptap/extension-heading": "^2.5.7", + "@tiptap/extension-history": "^2.5.7", + "@tiptap/extension-horizontal-rule": "^2.5.7", + "@tiptap/extension-italic": "^2.5.7", + "@tiptap/extension-list-item": "^2.5.7", + "@tiptap/extension-ordered-list": "^2.5.7", + "@tiptap/extension-paragraph": "^2.5.7", + "@tiptap/extension-strike": "^2.5.7", + "@tiptap/extension-text": "^2.5.7" }, "funding": { "type": "github", @@ -18763,33 +18768,33 @@ }, "packages/suggestion": { "name": "@tiptap/suggestion", - "version": "2.5.5", + "version": "2.5.7", "license": "MIT", "devDependencies": { - "@tiptap/core": "^2.5.5", - "@tiptap/pm": "^2.5.5" + "@tiptap/core": "^2.5.7", + "@tiptap/pm": "^2.5.7" }, "funding": { "type": "github", "url": "https://github.com/sponsors/ueberdosis" }, "peerDependencies": { - "@tiptap/core": "^2.5.5", - "@tiptap/pm": "^2.5.5" + "@tiptap/core": "^2.5.7", + "@tiptap/pm": "^2.5.7" } }, "packages/vue-2": { "name": "@tiptap/vue-2", - "version": "2.5.5", + "version": "2.5.7", "license": "MIT", "dependencies": { - "@tiptap/extension-bubble-menu": "^2.5.5", - "@tiptap/extension-floating-menu": "^2.5.5", + "@tiptap/extension-bubble-menu": "^2.5.7", + "@tiptap/extension-floating-menu": "^2.5.7", "vue-ts-types": "^1.6.0" }, "devDependencies": { - "@tiptap/core": "^2.5.5", - "@tiptap/pm": "^2.5.5", + "@tiptap/core": "^2.5.7", + "@tiptap/pm": "^2.5.7", "vue": "^2.6.0" }, "funding": { @@ -18797,8 +18802,8 @@ "url": "https://github.com/sponsors/ueberdosis" }, "peerDependencies": { - "@tiptap/core": "^2.5.5", - "@tiptap/pm": "^2.5.5", + "@tiptap/core": "^2.5.7", + "@tiptap/pm": "^2.5.7", "vue": "^2.6.0" } }, @@ -18829,15 +18834,15 @@ }, "packages/vue-3": { "name": "@tiptap/vue-3", - "version": "2.5.5", + "version": "2.5.7", "license": "MIT", "dependencies": { - "@tiptap/extension-bubble-menu": "^2.5.5", - "@tiptap/extension-floating-menu": "^2.5.5" + "@tiptap/extension-bubble-menu": "^2.5.7", + "@tiptap/extension-floating-menu": "^2.5.7" }, "devDependencies": { - "@tiptap/core": "^2.5.5", - "@tiptap/pm": "^2.5.5", + "@tiptap/core": "^2.5.7", + "@tiptap/pm": "^2.5.7", "vue": "^3.0.0" }, "funding": { @@ -18845,10 +18850,11 @@ "url": "https://github.com/sponsors/ueberdosis" }, "peerDependencies": { - "@tiptap/core": "^2.5.5", - "@tiptap/pm": "^2.5.5", + "@tiptap/core": "^2.5.7", + "@tiptap/pm": "^2.5.7", "vue": "^3.0.0" } - } + }, + "shared/rollup-config": {} } } diff --git a/package.json b/package.json index 1da6621cf..cf21df115 100644 --- a/package.json +++ b/package.json @@ -3,6 +3,7 @@ "packageManager": "npm@10.8.1", "workspaces": [ "demos", + "shared/*", "packages/*" ], "browserslist": [ diff --git a/packages/core/rollup.config.js b/packages/core/rollup.config.js index 3394eaf7c..cb8e99403 100644 --- a/packages/core/rollup.config.js +++ b/packages/core/rollup.config.js @@ -1,61 +1,5 @@ -import babel from '@rollup/plugin-babel' -import commonjs from '@rollup/plugin-commonjs' -import resolve from '@rollup/plugin-node-resolve' -import autoExternal from 'rollup-plugin-auto-external' -import sourcemaps from 'rollup-plugin-sourcemaps' -import typescript from 'rollup-plugin-typescript2' +import { baseConfig } from '@tiptap-shared/rollup-config' import pkg from './package.json' assert { type: 'json' } -export default { - external: [/@tiptap\/pm\/.*/], - input: 'src/index.ts', - output: [ - { - name: pkg.name, - file: pkg.umd, - format: 'umd', - sourcemap: true, - exports: 'named', - }, - { - name: pkg.name, - file: pkg.main, - format: 'cjs', - interop: 'compat', - sourcemap: true, - exports: 'named', - }, - { - name: pkg.name, - file: pkg.module, - format: 'es', - sourcemap: true, - exports: 'named', - }, - ], - plugins: [ - autoExternal({ - packagePath: './package.json', - }), - sourcemaps(), - resolve(), - commonjs(), - babel({ - babelHelpers: 'bundled', - exclude: '../../node_modules/**', - }), - typescript({ - tsconfig: '../../tsconfig.json', - tsconfigOverride: { - compilerOptions: { - declaration: true, - paths: { - '@tiptap/*': ['packages/*/src'], - }, - }, - include: null, - }, - }), - ], -} +export default baseConfig({ input: 'src/index.ts', pkg }) diff --git a/packages/extension-blockquote/rollup.config.js b/packages/extension-blockquote/rollup.config.js index 3394eaf7c..cb8e99403 100644 --- a/packages/extension-blockquote/rollup.config.js +++ b/packages/extension-blockquote/rollup.config.js @@ -1,61 +1,5 @@ -import babel from '@rollup/plugin-babel' -import commonjs from '@rollup/plugin-commonjs' -import resolve from '@rollup/plugin-node-resolve' -import autoExternal from 'rollup-plugin-auto-external' -import sourcemaps from 'rollup-plugin-sourcemaps' -import typescript from 'rollup-plugin-typescript2' +import { baseConfig } from '@tiptap-shared/rollup-config' import pkg from './package.json' assert { type: 'json' } -export default { - external: [/@tiptap\/pm\/.*/], - input: 'src/index.ts', - output: [ - { - name: pkg.name, - file: pkg.umd, - format: 'umd', - sourcemap: true, - exports: 'named', - }, - { - name: pkg.name, - file: pkg.main, - format: 'cjs', - interop: 'compat', - sourcemap: true, - exports: 'named', - }, - { - name: pkg.name, - file: pkg.module, - format: 'es', - sourcemap: true, - exports: 'named', - }, - ], - plugins: [ - autoExternal({ - packagePath: './package.json', - }), - sourcemaps(), - resolve(), - commonjs(), - babel({ - babelHelpers: 'bundled', - exclude: '../../node_modules/**', - }), - typescript({ - tsconfig: '../../tsconfig.json', - tsconfigOverride: { - compilerOptions: { - declaration: true, - paths: { - '@tiptap/*': ['packages/*/src'], - }, - }, - include: null, - }, - }), - ], -} +export default baseConfig({ input: 'src/index.ts', pkg }) diff --git a/packages/extension-bold/rollup.config.js b/packages/extension-bold/rollup.config.js index 3394eaf7c..cb8e99403 100644 --- a/packages/extension-bold/rollup.config.js +++ b/packages/extension-bold/rollup.config.js @@ -1,61 +1,5 @@ -import babel from '@rollup/plugin-babel' -import commonjs from '@rollup/plugin-commonjs' -import resolve from '@rollup/plugin-node-resolve' -import autoExternal from 'rollup-plugin-auto-external' -import sourcemaps from 'rollup-plugin-sourcemaps' -import typescript from 'rollup-plugin-typescript2' +import { baseConfig } from '@tiptap-shared/rollup-config' import pkg from './package.json' assert { type: 'json' } -export default { - external: [/@tiptap\/pm\/.*/], - input: 'src/index.ts', - output: [ - { - name: pkg.name, - file: pkg.umd, - format: 'umd', - sourcemap: true, - exports: 'named', - }, - { - name: pkg.name, - file: pkg.main, - format: 'cjs', - interop: 'compat', - sourcemap: true, - exports: 'named', - }, - { - name: pkg.name, - file: pkg.module, - format: 'es', - sourcemap: true, - exports: 'named', - }, - ], - plugins: [ - autoExternal({ - packagePath: './package.json', - }), - sourcemaps(), - resolve(), - commonjs(), - babel({ - babelHelpers: 'bundled', - exclude: '../../node_modules/**', - }), - typescript({ - tsconfig: '../../tsconfig.json', - tsconfigOverride: { - compilerOptions: { - declaration: true, - paths: { - '@tiptap/*': ['packages/*/src'], - }, - }, - include: null, - }, - }), - ], -} +export default baseConfig({ input: 'src/index.ts', pkg }) diff --git a/packages/extension-bubble-menu/rollup.config.js b/packages/extension-bubble-menu/rollup.config.js index 3394eaf7c..cb8e99403 100644 --- a/packages/extension-bubble-menu/rollup.config.js +++ b/packages/extension-bubble-menu/rollup.config.js @@ -1,61 +1,5 @@ -import babel from '@rollup/plugin-babel' -import commonjs from '@rollup/plugin-commonjs' -import resolve from '@rollup/plugin-node-resolve' -import autoExternal from 'rollup-plugin-auto-external' -import sourcemaps from 'rollup-plugin-sourcemaps' -import typescript from 'rollup-plugin-typescript2' +import { baseConfig } from '@tiptap-shared/rollup-config' import pkg from './package.json' assert { type: 'json' } -export default { - external: [/@tiptap\/pm\/.*/], - input: 'src/index.ts', - output: [ - { - name: pkg.name, - file: pkg.umd, - format: 'umd', - sourcemap: true, - exports: 'named', - }, - { - name: pkg.name, - file: pkg.main, - format: 'cjs', - interop: 'compat', - sourcemap: true, - exports: 'named', - }, - { - name: pkg.name, - file: pkg.module, - format: 'es', - sourcemap: true, - exports: 'named', - }, - ], - plugins: [ - autoExternal({ - packagePath: './package.json', - }), - sourcemaps(), - resolve(), - commonjs(), - babel({ - babelHelpers: 'bundled', - exclude: '../../node_modules/**', - }), - typescript({ - tsconfig: '../../tsconfig.json', - tsconfigOverride: { - compilerOptions: { - declaration: true, - paths: { - '@tiptap/*': ['packages/*/src'], - }, - }, - include: null, - }, - }), - ], -} +export default baseConfig({ input: 'src/index.ts', pkg }) diff --git a/packages/extension-bullet-list/rollup.config.js b/packages/extension-bullet-list/rollup.config.js index 3394eaf7c..cb8e99403 100644 --- a/packages/extension-bullet-list/rollup.config.js +++ b/packages/extension-bullet-list/rollup.config.js @@ -1,61 +1,5 @@ -import babel from '@rollup/plugin-babel' -import commonjs from '@rollup/plugin-commonjs' -import resolve from '@rollup/plugin-node-resolve' -import autoExternal from 'rollup-plugin-auto-external' -import sourcemaps from 'rollup-plugin-sourcemaps' -import typescript from 'rollup-plugin-typescript2' +import { baseConfig } from '@tiptap-shared/rollup-config' import pkg from './package.json' assert { type: 'json' } -export default { - external: [/@tiptap\/pm\/.*/], - input: 'src/index.ts', - output: [ - { - name: pkg.name, - file: pkg.umd, - format: 'umd', - sourcemap: true, - exports: 'named', - }, - { - name: pkg.name, - file: pkg.main, - format: 'cjs', - interop: 'compat', - sourcemap: true, - exports: 'named', - }, - { - name: pkg.name, - file: pkg.module, - format: 'es', - sourcemap: true, - exports: 'named', - }, - ], - plugins: [ - autoExternal({ - packagePath: './package.json', - }), - sourcemaps(), - resolve(), - commonjs(), - babel({ - babelHelpers: 'bundled', - exclude: '../../node_modules/**', - }), - typescript({ - tsconfig: '../../tsconfig.json', - tsconfigOverride: { - compilerOptions: { - declaration: true, - paths: { - '@tiptap/*': ['packages/*/src'], - }, - }, - include: null, - }, - }), - ], -} +export default baseConfig({ input: 'src/index.ts', pkg }) diff --git a/packages/extension-character-count/rollup.config.js b/packages/extension-character-count/rollup.config.js index 3394eaf7c..cb8e99403 100644 --- a/packages/extension-character-count/rollup.config.js +++ b/packages/extension-character-count/rollup.config.js @@ -1,61 +1,5 @@ -import babel from '@rollup/plugin-babel' -import commonjs from '@rollup/plugin-commonjs' -import resolve from '@rollup/plugin-node-resolve' -import autoExternal from 'rollup-plugin-auto-external' -import sourcemaps from 'rollup-plugin-sourcemaps' -import typescript from 'rollup-plugin-typescript2' +import { baseConfig } from '@tiptap-shared/rollup-config' import pkg from './package.json' assert { type: 'json' } -export default { - external: [/@tiptap\/pm\/.*/], - input: 'src/index.ts', - output: [ - { - name: pkg.name, - file: pkg.umd, - format: 'umd', - sourcemap: true, - exports: 'named', - }, - { - name: pkg.name, - file: pkg.main, - format: 'cjs', - interop: 'compat', - sourcemap: true, - exports: 'named', - }, - { - name: pkg.name, - file: pkg.module, - format: 'es', - sourcemap: true, - exports: 'named', - }, - ], - plugins: [ - autoExternal({ - packagePath: './package.json', - }), - sourcemaps(), - resolve(), - commonjs(), - babel({ - babelHelpers: 'bundled', - exclude: '../../node_modules/**', - }), - typescript({ - tsconfig: '../../tsconfig.json', - tsconfigOverride: { - compilerOptions: { - declaration: true, - paths: { - '@tiptap/*': ['packages/*/src'], - }, - }, - include: null, - }, - }), - ], -} +export default baseConfig({ input: 'src/index.ts', pkg }) diff --git a/packages/extension-code-block-lowlight/rollup.config.js b/packages/extension-code-block-lowlight/rollup.config.js index 3394eaf7c..cb8e99403 100644 --- a/packages/extension-code-block-lowlight/rollup.config.js +++ b/packages/extension-code-block-lowlight/rollup.config.js @@ -1,61 +1,5 @@ -import babel from '@rollup/plugin-babel' -import commonjs from '@rollup/plugin-commonjs' -import resolve from '@rollup/plugin-node-resolve' -import autoExternal from 'rollup-plugin-auto-external' -import sourcemaps from 'rollup-plugin-sourcemaps' -import typescript from 'rollup-plugin-typescript2' +import { baseConfig } from '@tiptap-shared/rollup-config' import pkg from './package.json' assert { type: 'json' } -export default { - external: [/@tiptap\/pm\/.*/], - input: 'src/index.ts', - output: [ - { - name: pkg.name, - file: pkg.umd, - format: 'umd', - sourcemap: true, - exports: 'named', - }, - { - name: pkg.name, - file: pkg.main, - format: 'cjs', - interop: 'compat', - sourcemap: true, - exports: 'named', - }, - { - name: pkg.name, - file: pkg.module, - format: 'es', - sourcemap: true, - exports: 'named', - }, - ], - plugins: [ - autoExternal({ - packagePath: './package.json', - }), - sourcemaps(), - resolve(), - commonjs(), - babel({ - babelHelpers: 'bundled', - exclude: '../../node_modules/**', - }), - typescript({ - tsconfig: '../../tsconfig.json', - tsconfigOverride: { - compilerOptions: { - declaration: true, - paths: { - '@tiptap/*': ['packages/*/src'], - }, - }, - include: null, - }, - }), - ], -} +export default baseConfig({ input: 'src/index.ts', pkg }) diff --git a/packages/extension-code-block/rollup.config.js b/packages/extension-code-block/rollup.config.js index 3394eaf7c..cb8e99403 100644 --- a/packages/extension-code-block/rollup.config.js +++ b/packages/extension-code-block/rollup.config.js @@ -1,61 +1,5 @@ -import babel from '@rollup/plugin-babel' -import commonjs from '@rollup/plugin-commonjs' -import resolve from '@rollup/plugin-node-resolve' -import autoExternal from 'rollup-plugin-auto-external' -import sourcemaps from 'rollup-plugin-sourcemaps' -import typescript from 'rollup-plugin-typescript2' +import { baseConfig } from '@tiptap-shared/rollup-config' import pkg from './package.json' assert { type: 'json' } -export default { - external: [/@tiptap\/pm\/.*/], - input: 'src/index.ts', - output: [ - { - name: pkg.name, - file: pkg.umd, - format: 'umd', - sourcemap: true, - exports: 'named', - }, - { - name: pkg.name, - file: pkg.main, - format: 'cjs', - interop: 'compat', - sourcemap: true, - exports: 'named', - }, - { - name: pkg.name, - file: pkg.module, - format: 'es', - sourcemap: true, - exports: 'named', - }, - ], - plugins: [ - autoExternal({ - packagePath: './package.json', - }), - sourcemaps(), - resolve(), - commonjs(), - babel({ - babelHelpers: 'bundled', - exclude: '../../node_modules/**', - }), - typescript({ - tsconfig: '../../tsconfig.json', - tsconfigOverride: { - compilerOptions: { - declaration: true, - paths: { - '@tiptap/*': ['packages/*/src'], - }, - }, - include: null, - }, - }), - ], -} +export default baseConfig({ input: 'src/index.ts', pkg }) diff --git a/packages/extension-code/rollup.config.js b/packages/extension-code/rollup.config.js index 3394eaf7c..cb8e99403 100644 --- a/packages/extension-code/rollup.config.js +++ b/packages/extension-code/rollup.config.js @@ -1,61 +1,5 @@ -import babel from '@rollup/plugin-babel' -import commonjs from '@rollup/plugin-commonjs' -import resolve from '@rollup/plugin-node-resolve' -import autoExternal from 'rollup-plugin-auto-external' -import sourcemaps from 'rollup-plugin-sourcemaps' -import typescript from 'rollup-plugin-typescript2' +import { baseConfig } from '@tiptap-shared/rollup-config' import pkg from './package.json' assert { type: 'json' } -export default { - external: [/@tiptap\/pm\/.*/], - input: 'src/index.ts', - output: [ - { - name: pkg.name, - file: pkg.umd, - format: 'umd', - sourcemap: true, - exports: 'named', - }, - { - name: pkg.name, - file: pkg.main, - format: 'cjs', - interop: 'compat', - sourcemap: true, - exports: 'named', - }, - { - name: pkg.name, - file: pkg.module, - format: 'es', - sourcemap: true, - exports: 'named', - }, - ], - plugins: [ - autoExternal({ - packagePath: './package.json', - }), - sourcemaps(), - resolve(), - commonjs(), - babel({ - babelHelpers: 'bundled', - exclude: '../../node_modules/**', - }), - typescript({ - tsconfig: '../../tsconfig.json', - tsconfigOverride: { - compilerOptions: { - declaration: true, - paths: { - '@tiptap/*': ['packages/*/src'], - }, - }, - include: null, - }, - }), - ], -} +export default baseConfig({ input: 'src/index.ts', pkg }) diff --git a/packages/extension-collaboration-cursor/rollup.config.js b/packages/extension-collaboration-cursor/rollup.config.js index 3394eaf7c..cb8e99403 100644 --- a/packages/extension-collaboration-cursor/rollup.config.js +++ b/packages/extension-collaboration-cursor/rollup.config.js @@ -1,61 +1,5 @@ -import babel from '@rollup/plugin-babel' -import commonjs from '@rollup/plugin-commonjs' -import resolve from '@rollup/plugin-node-resolve' -import autoExternal from 'rollup-plugin-auto-external' -import sourcemaps from 'rollup-plugin-sourcemaps' -import typescript from 'rollup-plugin-typescript2' +import { baseConfig } from '@tiptap-shared/rollup-config' import pkg from './package.json' assert { type: 'json' } -export default { - external: [/@tiptap\/pm\/.*/], - input: 'src/index.ts', - output: [ - { - name: pkg.name, - file: pkg.umd, - format: 'umd', - sourcemap: true, - exports: 'named', - }, - { - name: pkg.name, - file: pkg.main, - format: 'cjs', - interop: 'compat', - sourcemap: true, - exports: 'named', - }, - { - name: pkg.name, - file: pkg.module, - format: 'es', - sourcemap: true, - exports: 'named', - }, - ], - plugins: [ - autoExternal({ - packagePath: './package.json', - }), - sourcemaps(), - resolve(), - commonjs(), - babel({ - babelHelpers: 'bundled', - exclude: '../../node_modules/**', - }), - typescript({ - tsconfig: '../../tsconfig.json', - tsconfigOverride: { - compilerOptions: { - declaration: true, - paths: { - '@tiptap/*': ['packages/*/src'], - }, - }, - include: null, - }, - }), - ], -} +export default baseConfig({ input: 'src/index.ts', pkg }) diff --git a/packages/extension-collaboration/rollup.config.js b/packages/extension-collaboration/rollup.config.js index 3394eaf7c..cb8e99403 100644 --- a/packages/extension-collaboration/rollup.config.js +++ b/packages/extension-collaboration/rollup.config.js @@ -1,61 +1,5 @@ -import babel from '@rollup/plugin-babel' -import commonjs from '@rollup/plugin-commonjs' -import resolve from '@rollup/plugin-node-resolve' -import autoExternal from 'rollup-plugin-auto-external' -import sourcemaps from 'rollup-plugin-sourcemaps' -import typescript from 'rollup-plugin-typescript2' +import { baseConfig } from '@tiptap-shared/rollup-config' import pkg from './package.json' assert { type: 'json' } -export default { - external: [/@tiptap\/pm\/.*/], - input: 'src/index.ts', - output: [ - { - name: pkg.name, - file: pkg.umd, - format: 'umd', - sourcemap: true, - exports: 'named', - }, - { - name: pkg.name, - file: pkg.main, - format: 'cjs', - interop: 'compat', - sourcemap: true, - exports: 'named', - }, - { - name: pkg.name, - file: pkg.module, - format: 'es', - sourcemap: true, - exports: 'named', - }, - ], - plugins: [ - autoExternal({ - packagePath: './package.json', - }), - sourcemaps(), - resolve(), - commonjs(), - babel({ - babelHelpers: 'bundled', - exclude: '../../node_modules/**', - }), - typescript({ - tsconfig: '../../tsconfig.json', - tsconfigOverride: { - compilerOptions: { - declaration: true, - paths: { - '@tiptap/*': ['packages/*/src'], - }, - }, - include: null, - }, - }), - ], -} +export default baseConfig({ input: 'src/index.ts', pkg }) diff --git a/packages/extension-color/rollup.config.js b/packages/extension-color/rollup.config.js index 3394eaf7c..cb8e99403 100644 --- a/packages/extension-color/rollup.config.js +++ b/packages/extension-color/rollup.config.js @@ -1,61 +1,5 @@ -import babel from '@rollup/plugin-babel' -import commonjs from '@rollup/plugin-commonjs' -import resolve from '@rollup/plugin-node-resolve' -import autoExternal from 'rollup-plugin-auto-external' -import sourcemaps from 'rollup-plugin-sourcemaps' -import typescript from 'rollup-plugin-typescript2' +import { baseConfig } from '@tiptap-shared/rollup-config' import pkg from './package.json' assert { type: 'json' } -export default { - external: [/@tiptap\/pm\/.*/], - input: 'src/index.ts', - output: [ - { - name: pkg.name, - file: pkg.umd, - format: 'umd', - sourcemap: true, - exports: 'named', - }, - { - name: pkg.name, - file: pkg.main, - format: 'cjs', - interop: 'compat', - sourcemap: true, - exports: 'named', - }, - { - name: pkg.name, - file: pkg.module, - format: 'es', - sourcemap: true, - exports: 'named', - }, - ], - plugins: [ - autoExternal({ - packagePath: './package.json', - }), - sourcemaps(), - resolve(), - commonjs(), - babel({ - babelHelpers: 'bundled', - exclude: '../../node_modules/**', - }), - typescript({ - tsconfig: '../../tsconfig.json', - tsconfigOverride: { - compilerOptions: { - declaration: true, - paths: { - '@tiptap/*': ['packages/*/src'], - }, - }, - include: null, - }, - }), - ], -} +export default baseConfig({ input: 'src/index.ts', pkg }) diff --git a/packages/extension-document/rollup.config.js b/packages/extension-document/rollup.config.js index 3394eaf7c..cb8e99403 100644 --- a/packages/extension-document/rollup.config.js +++ b/packages/extension-document/rollup.config.js @@ -1,61 +1,5 @@ -import babel from '@rollup/plugin-babel' -import commonjs from '@rollup/plugin-commonjs' -import resolve from '@rollup/plugin-node-resolve' -import autoExternal from 'rollup-plugin-auto-external' -import sourcemaps from 'rollup-plugin-sourcemaps' -import typescript from 'rollup-plugin-typescript2' +import { baseConfig } from '@tiptap-shared/rollup-config' import pkg from './package.json' assert { type: 'json' } -export default { - external: [/@tiptap\/pm\/.*/], - input: 'src/index.ts', - output: [ - { - name: pkg.name, - file: pkg.umd, - format: 'umd', - sourcemap: true, - exports: 'named', - }, - { - name: pkg.name, - file: pkg.main, - format: 'cjs', - interop: 'compat', - sourcemap: true, - exports: 'named', - }, - { - name: pkg.name, - file: pkg.module, - format: 'es', - sourcemap: true, - exports: 'named', - }, - ], - plugins: [ - autoExternal({ - packagePath: './package.json', - }), - sourcemaps(), - resolve(), - commonjs(), - babel({ - babelHelpers: 'bundled', - exclude: '../../node_modules/**', - }), - typescript({ - tsconfig: '../../tsconfig.json', - tsconfigOverride: { - compilerOptions: { - declaration: true, - paths: { - '@tiptap/*': ['packages/*/src'], - }, - }, - include: null, - }, - }), - ], -} +export default baseConfig({ input: 'src/index.ts', pkg }) diff --git a/packages/extension-dropcursor/rollup.config.js b/packages/extension-dropcursor/rollup.config.js index 3394eaf7c..cb8e99403 100644 --- a/packages/extension-dropcursor/rollup.config.js +++ b/packages/extension-dropcursor/rollup.config.js @@ -1,61 +1,5 @@ -import babel from '@rollup/plugin-babel' -import commonjs from '@rollup/plugin-commonjs' -import resolve from '@rollup/plugin-node-resolve' -import autoExternal from 'rollup-plugin-auto-external' -import sourcemaps from 'rollup-plugin-sourcemaps' -import typescript from 'rollup-plugin-typescript2' +import { baseConfig } from '@tiptap-shared/rollup-config' import pkg from './package.json' assert { type: 'json' } -export default { - external: [/@tiptap\/pm\/.*/], - input: 'src/index.ts', - output: [ - { - name: pkg.name, - file: pkg.umd, - format: 'umd', - sourcemap: true, - exports: 'named', - }, - { - name: pkg.name, - file: pkg.main, - format: 'cjs', - interop: 'compat', - sourcemap: true, - exports: 'named', - }, - { - name: pkg.name, - file: pkg.module, - format: 'es', - sourcemap: true, - exports: 'named', - }, - ], - plugins: [ - autoExternal({ - packagePath: './package.json', - }), - sourcemaps(), - resolve(), - commonjs(), - babel({ - babelHelpers: 'bundled', - exclude: '../../node_modules/**', - }), - typescript({ - tsconfig: '../../tsconfig.json', - tsconfigOverride: { - compilerOptions: { - declaration: true, - paths: { - '@tiptap/*': ['packages/*/src'], - }, - }, - include: null, - }, - }), - ], -} +export default baseConfig({ input: 'src/index.ts', pkg }) diff --git a/packages/extension-floating-menu/rollup.config.js b/packages/extension-floating-menu/rollup.config.js index 3394eaf7c..cb8e99403 100644 --- a/packages/extension-floating-menu/rollup.config.js +++ b/packages/extension-floating-menu/rollup.config.js @@ -1,61 +1,5 @@ -import babel from '@rollup/plugin-babel' -import commonjs from '@rollup/plugin-commonjs' -import resolve from '@rollup/plugin-node-resolve' -import autoExternal from 'rollup-plugin-auto-external' -import sourcemaps from 'rollup-plugin-sourcemaps' -import typescript from 'rollup-plugin-typescript2' +import { baseConfig } from '@tiptap-shared/rollup-config' import pkg from './package.json' assert { type: 'json' } -export default { - external: [/@tiptap\/pm\/.*/], - input: 'src/index.ts', - output: [ - { - name: pkg.name, - file: pkg.umd, - format: 'umd', - sourcemap: true, - exports: 'named', - }, - { - name: pkg.name, - file: pkg.main, - format: 'cjs', - interop: 'compat', - sourcemap: true, - exports: 'named', - }, - { - name: pkg.name, - file: pkg.module, - format: 'es', - sourcemap: true, - exports: 'named', - }, - ], - plugins: [ - autoExternal({ - packagePath: './package.json', - }), - sourcemaps(), - resolve(), - commonjs(), - babel({ - babelHelpers: 'bundled', - exclude: '../../node_modules/**', - }), - typescript({ - tsconfig: '../../tsconfig.json', - tsconfigOverride: { - compilerOptions: { - declaration: true, - paths: { - '@tiptap/*': ['packages/*/src'], - }, - }, - include: null, - }, - }), - ], -} +export default baseConfig({ input: 'src/index.ts', pkg }) diff --git a/packages/extension-focus/rollup.config.js b/packages/extension-focus/rollup.config.js index 3394eaf7c..cb8e99403 100644 --- a/packages/extension-focus/rollup.config.js +++ b/packages/extension-focus/rollup.config.js @@ -1,61 +1,5 @@ -import babel from '@rollup/plugin-babel' -import commonjs from '@rollup/plugin-commonjs' -import resolve from '@rollup/plugin-node-resolve' -import autoExternal from 'rollup-plugin-auto-external' -import sourcemaps from 'rollup-plugin-sourcemaps' -import typescript from 'rollup-plugin-typescript2' +import { baseConfig } from '@tiptap-shared/rollup-config' import pkg from './package.json' assert { type: 'json' } -export default { - external: [/@tiptap\/pm\/.*/], - input: 'src/index.ts', - output: [ - { - name: pkg.name, - file: pkg.umd, - format: 'umd', - sourcemap: true, - exports: 'named', - }, - { - name: pkg.name, - file: pkg.main, - format: 'cjs', - interop: 'compat', - sourcemap: true, - exports: 'named', - }, - { - name: pkg.name, - file: pkg.module, - format: 'es', - sourcemap: true, - exports: 'named', - }, - ], - plugins: [ - autoExternal({ - packagePath: './package.json', - }), - sourcemaps(), - resolve(), - commonjs(), - babel({ - babelHelpers: 'bundled', - exclude: '../../node_modules/**', - }), - typescript({ - tsconfig: '../../tsconfig.json', - tsconfigOverride: { - compilerOptions: { - declaration: true, - paths: { - '@tiptap/*': ['packages/*/src'], - }, - }, - include: null, - }, - }), - ], -} +export default baseConfig({ input: 'src/index.ts', pkg }) diff --git a/packages/extension-font-family/rollup.config.js b/packages/extension-font-family/rollup.config.js index 3394eaf7c..cb8e99403 100644 --- a/packages/extension-font-family/rollup.config.js +++ b/packages/extension-font-family/rollup.config.js @@ -1,61 +1,5 @@ -import babel from '@rollup/plugin-babel' -import commonjs from '@rollup/plugin-commonjs' -import resolve from '@rollup/plugin-node-resolve' -import autoExternal from 'rollup-plugin-auto-external' -import sourcemaps from 'rollup-plugin-sourcemaps' -import typescript from 'rollup-plugin-typescript2' +import { baseConfig } from '@tiptap-shared/rollup-config' import pkg from './package.json' assert { type: 'json' } -export default { - external: [/@tiptap\/pm\/.*/], - input: 'src/index.ts', - output: [ - { - name: pkg.name, - file: pkg.umd, - format: 'umd', - sourcemap: true, - exports: 'named', - }, - { - name: pkg.name, - file: pkg.main, - format: 'cjs', - interop: 'compat', - sourcemap: true, - exports: 'named', - }, - { - name: pkg.name, - file: pkg.module, - format: 'es', - sourcemap: true, - exports: 'named', - }, - ], - plugins: [ - autoExternal({ - packagePath: './package.json', - }), - sourcemaps(), - resolve(), - commonjs(), - babel({ - babelHelpers: 'bundled', - exclude: '../../node_modules/**', - }), - typescript({ - tsconfig: '../../tsconfig.json', - tsconfigOverride: { - compilerOptions: { - declaration: true, - paths: { - '@tiptap/*': ['packages/*/src'], - }, - }, - include: null, - }, - }), - ], -} +export default baseConfig({ input: 'src/index.ts', pkg }) diff --git a/packages/extension-gapcursor/rollup.config.js b/packages/extension-gapcursor/rollup.config.js index 3394eaf7c..cb8e99403 100644 --- a/packages/extension-gapcursor/rollup.config.js +++ b/packages/extension-gapcursor/rollup.config.js @@ -1,61 +1,5 @@ -import babel from '@rollup/plugin-babel' -import commonjs from '@rollup/plugin-commonjs' -import resolve from '@rollup/plugin-node-resolve' -import autoExternal from 'rollup-plugin-auto-external' -import sourcemaps from 'rollup-plugin-sourcemaps' -import typescript from 'rollup-plugin-typescript2' +import { baseConfig } from '@tiptap-shared/rollup-config' import pkg from './package.json' assert { type: 'json' } -export default { - external: [/@tiptap\/pm\/.*/], - input: 'src/index.ts', - output: [ - { - name: pkg.name, - file: pkg.umd, - format: 'umd', - sourcemap: true, - exports: 'named', - }, - { - name: pkg.name, - file: pkg.main, - format: 'cjs', - interop: 'compat', - sourcemap: true, - exports: 'named', - }, - { - name: pkg.name, - file: pkg.module, - format: 'es', - sourcemap: true, - exports: 'named', - }, - ], - plugins: [ - autoExternal({ - packagePath: './package.json', - }), - sourcemaps(), - resolve(), - commonjs(), - babel({ - babelHelpers: 'bundled', - exclude: '../../node_modules/**', - }), - typescript({ - tsconfig: '../../tsconfig.json', - tsconfigOverride: { - compilerOptions: { - declaration: true, - paths: { - '@tiptap/*': ['packages/*/src'], - }, - }, - include: null, - }, - }), - ], -} +export default baseConfig({ input: 'src/index.ts', pkg }) diff --git a/packages/extension-hard-break/rollup.config.js b/packages/extension-hard-break/rollup.config.js index 3394eaf7c..cb8e99403 100644 --- a/packages/extension-hard-break/rollup.config.js +++ b/packages/extension-hard-break/rollup.config.js @@ -1,61 +1,5 @@ -import babel from '@rollup/plugin-babel' -import commonjs from '@rollup/plugin-commonjs' -import resolve from '@rollup/plugin-node-resolve' -import autoExternal from 'rollup-plugin-auto-external' -import sourcemaps from 'rollup-plugin-sourcemaps' -import typescript from 'rollup-plugin-typescript2' +import { baseConfig } from '@tiptap-shared/rollup-config' import pkg from './package.json' assert { type: 'json' } -export default { - external: [/@tiptap\/pm\/.*/], - input: 'src/index.ts', - output: [ - { - name: pkg.name, - file: pkg.umd, - format: 'umd', - sourcemap: true, - exports: 'named', - }, - { - name: pkg.name, - file: pkg.main, - format: 'cjs', - interop: 'compat', - sourcemap: true, - exports: 'named', - }, - { - name: pkg.name, - file: pkg.module, - format: 'es', - sourcemap: true, - exports: 'named', - }, - ], - plugins: [ - autoExternal({ - packagePath: './package.json', - }), - sourcemaps(), - resolve(), - commonjs(), - babel({ - babelHelpers: 'bundled', - exclude: '../../node_modules/**', - }), - typescript({ - tsconfig: '../../tsconfig.json', - tsconfigOverride: { - compilerOptions: { - declaration: true, - paths: { - '@tiptap/*': ['packages/*/src'], - }, - }, - include: null, - }, - }), - ], -} +export default baseConfig({ input: 'src/index.ts', pkg }) diff --git a/packages/extension-heading/rollup.config.js b/packages/extension-heading/rollup.config.js index 3394eaf7c..cb8e99403 100644 --- a/packages/extension-heading/rollup.config.js +++ b/packages/extension-heading/rollup.config.js @@ -1,61 +1,5 @@ -import babel from '@rollup/plugin-babel' -import commonjs from '@rollup/plugin-commonjs' -import resolve from '@rollup/plugin-node-resolve' -import autoExternal from 'rollup-plugin-auto-external' -import sourcemaps from 'rollup-plugin-sourcemaps' -import typescript from 'rollup-plugin-typescript2' +import { baseConfig } from '@tiptap-shared/rollup-config' import pkg from './package.json' assert { type: 'json' } -export default { - external: [/@tiptap\/pm\/.*/], - input: 'src/index.ts', - output: [ - { - name: pkg.name, - file: pkg.umd, - format: 'umd', - sourcemap: true, - exports: 'named', - }, - { - name: pkg.name, - file: pkg.main, - format: 'cjs', - interop: 'compat', - sourcemap: true, - exports: 'named', - }, - { - name: pkg.name, - file: pkg.module, - format: 'es', - sourcemap: true, - exports: 'named', - }, - ], - plugins: [ - autoExternal({ - packagePath: './package.json', - }), - sourcemaps(), - resolve(), - commonjs(), - babel({ - babelHelpers: 'bundled', - exclude: '../../node_modules/**', - }), - typescript({ - tsconfig: '../../tsconfig.json', - tsconfigOverride: { - compilerOptions: { - declaration: true, - paths: { - '@tiptap/*': ['packages/*/src'], - }, - }, - include: null, - }, - }), - ], -} +export default baseConfig({ input: 'src/index.ts', pkg }) diff --git a/packages/extension-highlight/rollup.config.js b/packages/extension-highlight/rollup.config.js index 3394eaf7c..cb8e99403 100644 --- a/packages/extension-highlight/rollup.config.js +++ b/packages/extension-highlight/rollup.config.js @@ -1,61 +1,5 @@ -import babel from '@rollup/plugin-babel' -import commonjs from '@rollup/plugin-commonjs' -import resolve from '@rollup/plugin-node-resolve' -import autoExternal from 'rollup-plugin-auto-external' -import sourcemaps from 'rollup-plugin-sourcemaps' -import typescript from 'rollup-plugin-typescript2' +import { baseConfig } from '@tiptap-shared/rollup-config' import pkg from './package.json' assert { type: 'json' } -export default { - external: [/@tiptap\/pm\/.*/], - input: 'src/index.ts', - output: [ - { - name: pkg.name, - file: pkg.umd, - format: 'umd', - sourcemap: true, - exports: 'named', - }, - { - name: pkg.name, - file: pkg.main, - format: 'cjs', - interop: 'compat', - sourcemap: true, - exports: 'named', - }, - { - name: pkg.name, - file: pkg.module, - format: 'es', - sourcemap: true, - exports: 'named', - }, - ], - plugins: [ - autoExternal({ - packagePath: './package.json', - }), - sourcemaps(), - resolve(), - commonjs(), - babel({ - babelHelpers: 'bundled', - exclude: '../../node_modules/**', - }), - typescript({ - tsconfig: '../../tsconfig.json', - tsconfigOverride: { - compilerOptions: { - declaration: true, - paths: { - '@tiptap/*': ['packages/*/src'], - }, - }, - include: null, - }, - }), - ], -} +export default baseConfig({ input: 'src/index.ts', pkg }) diff --git a/packages/extension-history/rollup.config.js b/packages/extension-history/rollup.config.js index 3394eaf7c..cb8e99403 100644 --- a/packages/extension-history/rollup.config.js +++ b/packages/extension-history/rollup.config.js @@ -1,61 +1,5 @@ -import babel from '@rollup/plugin-babel' -import commonjs from '@rollup/plugin-commonjs' -import resolve from '@rollup/plugin-node-resolve' -import autoExternal from 'rollup-plugin-auto-external' -import sourcemaps from 'rollup-plugin-sourcemaps' -import typescript from 'rollup-plugin-typescript2' +import { baseConfig } from '@tiptap-shared/rollup-config' import pkg from './package.json' assert { type: 'json' } -export default { - external: [/@tiptap\/pm\/.*/], - input: 'src/index.ts', - output: [ - { - name: pkg.name, - file: pkg.umd, - format: 'umd', - sourcemap: true, - exports: 'named', - }, - { - name: pkg.name, - file: pkg.main, - format: 'cjs', - interop: 'compat', - sourcemap: true, - exports: 'named', - }, - { - name: pkg.name, - file: pkg.module, - format: 'es', - sourcemap: true, - exports: 'named', - }, - ], - plugins: [ - autoExternal({ - packagePath: './package.json', - }), - sourcemaps(), - resolve(), - commonjs(), - babel({ - babelHelpers: 'bundled', - exclude: '../../node_modules/**', - }), - typescript({ - tsconfig: '../../tsconfig.json', - tsconfigOverride: { - compilerOptions: { - declaration: true, - paths: { - '@tiptap/*': ['packages/*/src'], - }, - }, - include: null, - }, - }), - ], -} +export default baseConfig({ input: 'src/index.ts', pkg }) diff --git a/packages/extension-horizontal-rule/rollup.config.js b/packages/extension-horizontal-rule/rollup.config.js index 3394eaf7c..cb8e99403 100644 --- a/packages/extension-horizontal-rule/rollup.config.js +++ b/packages/extension-horizontal-rule/rollup.config.js @@ -1,61 +1,5 @@ -import babel from '@rollup/plugin-babel' -import commonjs from '@rollup/plugin-commonjs' -import resolve from '@rollup/plugin-node-resolve' -import autoExternal from 'rollup-plugin-auto-external' -import sourcemaps from 'rollup-plugin-sourcemaps' -import typescript from 'rollup-plugin-typescript2' +import { baseConfig } from '@tiptap-shared/rollup-config' import pkg from './package.json' assert { type: 'json' } -export default { - external: [/@tiptap\/pm\/.*/], - input: 'src/index.ts', - output: [ - { - name: pkg.name, - file: pkg.umd, - format: 'umd', - sourcemap: true, - exports: 'named', - }, - { - name: pkg.name, - file: pkg.main, - format: 'cjs', - interop: 'compat', - sourcemap: true, - exports: 'named', - }, - { - name: pkg.name, - file: pkg.module, - format: 'es', - sourcemap: true, - exports: 'named', - }, - ], - plugins: [ - autoExternal({ - packagePath: './package.json', - }), - sourcemaps(), - resolve(), - commonjs(), - babel({ - babelHelpers: 'bundled', - exclude: '../../node_modules/**', - }), - typescript({ - tsconfig: '../../tsconfig.json', - tsconfigOverride: { - compilerOptions: { - declaration: true, - paths: { - '@tiptap/*': ['packages/*/src'], - }, - }, - include: null, - }, - }), - ], -} +export default baseConfig({ input: 'src/index.ts', pkg }) diff --git a/packages/extension-image/rollup.config.js b/packages/extension-image/rollup.config.js index 3394eaf7c..cb8e99403 100644 --- a/packages/extension-image/rollup.config.js +++ b/packages/extension-image/rollup.config.js @@ -1,61 +1,5 @@ -import babel from '@rollup/plugin-babel' -import commonjs from '@rollup/plugin-commonjs' -import resolve from '@rollup/plugin-node-resolve' -import autoExternal from 'rollup-plugin-auto-external' -import sourcemaps from 'rollup-plugin-sourcemaps' -import typescript from 'rollup-plugin-typescript2' +import { baseConfig } from '@tiptap-shared/rollup-config' import pkg from './package.json' assert { type: 'json' } -export default { - external: [/@tiptap\/pm\/.*/], - input: 'src/index.ts', - output: [ - { - name: pkg.name, - file: pkg.umd, - format: 'umd', - sourcemap: true, - exports: 'named', - }, - { - name: pkg.name, - file: pkg.main, - format: 'cjs', - interop: 'compat', - sourcemap: true, - exports: 'named', - }, - { - name: pkg.name, - file: pkg.module, - format: 'es', - sourcemap: true, - exports: 'named', - }, - ], - plugins: [ - autoExternal({ - packagePath: './package.json', - }), - sourcemaps(), - resolve(), - commonjs(), - babel({ - babelHelpers: 'bundled', - exclude: '../../node_modules/**', - }), - typescript({ - tsconfig: '../../tsconfig.json', - tsconfigOverride: { - compilerOptions: { - declaration: true, - paths: { - '@tiptap/*': ['packages/*/src'], - }, - }, - include: null, - }, - }), - ], -} +export default baseConfig({ input: 'src/index.ts', pkg }) diff --git a/packages/extension-italic/rollup.config.js b/packages/extension-italic/rollup.config.js index 3394eaf7c..cb8e99403 100644 --- a/packages/extension-italic/rollup.config.js +++ b/packages/extension-italic/rollup.config.js @@ -1,61 +1,5 @@ -import babel from '@rollup/plugin-babel' -import commonjs from '@rollup/plugin-commonjs' -import resolve from '@rollup/plugin-node-resolve' -import autoExternal from 'rollup-plugin-auto-external' -import sourcemaps from 'rollup-plugin-sourcemaps' -import typescript from 'rollup-plugin-typescript2' +import { baseConfig } from '@tiptap-shared/rollup-config' import pkg from './package.json' assert { type: 'json' } -export default { - external: [/@tiptap\/pm\/.*/], - input: 'src/index.ts', - output: [ - { - name: pkg.name, - file: pkg.umd, - format: 'umd', - sourcemap: true, - exports: 'named', - }, - { - name: pkg.name, - file: pkg.main, - format: 'cjs', - interop: 'compat', - sourcemap: true, - exports: 'named', - }, - { - name: pkg.name, - file: pkg.module, - format: 'es', - sourcemap: true, - exports: 'named', - }, - ], - plugins: [ - autoExternal({ - packagePath: './package.json', - }), - sourcemaps(), - resolve(), - commonjs(), - babel({ - babelHelpers: 'bundled', - exclude: '../../node_modules/**', - }), - typescript({ - tsconfig: '../../tsconfig.json', - tsconfigOverride: { - compilerOptions: { - declaration: true, - paths: { - '@tiptap/*': ['packages/*/src'], - }, - }, - include: null, - }, - }), - ], -} +export default baseConfig({ input: 'src/index.ts', pkg }) diff --git a/packages/extension-link/rollup.config.js b/packages/extension-link/rollup.config.js index 3394eaf7c..cb8e99403 100644 --- a/packages/extension-link/rollup.config.js +++ b/packages/extension-link/rollup.config.js @@ -1,61 +1,5 @@ -import babel from '@rollup/plugin-babel' -import commonjs from '@rollup/plugin-commonjs' -import resolve from '@rollup/plugin-node-resolve' -import autoExternal from 'rollup-plugin-auto-external' -import sourcemaps from 'rollup-plugin-sourcemaps' -import typescript from 'rollup-plugin-typescript2' +import { baseConfig } from '@tiptap-shared/rollup-config' import pkg from './package.json' assert { type: 'json' } -export default { - external: [/@tiptap\/pm\/.*/], - input: 'src/index.ts', - output: [ - { - name: pkg.name, - file: pkg.umd, - format: 'umd', - sourcemap: true, - exports: 'named', - }, - { - name: pkg.name, - file: pkg.main, - format: 'cjs', - interop: 'compat', - sourcemap: true, - exports: 'named', - }, - { - name: pkg.name, - file: pkg.module, - format: 'es', - sourcemap: true, - exports: 'named', - }, - ], - plugins: [ - autoExternal({ - packagePath: './package.json', - }), - sourcemaps(), - resolve(), - commonjs(), - babel({ - babelHelpers: 'bundled', - exclude: '../../node_modules/**', - }), - typescript({ - tsconfig: '../../tsconfig.json', - tsconfigOverride: { - compilerOptions: { - declaration: true, - paths: { - '@tiptap/*': ['packages/*/src'], - }, - }, - include: null, - }, - }), - ], -} +export default baseConfig({ input: 'src/index.ts', pkg }) diff --git a/packages/extension-list-item/rollup.config.js b/packages/extension-list-item/rollup.config.js index 3394eaf7c..cb8e99403 100644 --- a/packages/extension-list-item/rollup.config.js +++ b/packages/extension-list-item/rollup.config.js @@ -1,61 +1,5 @@ -import babel from '@rollup/plugin-babel' -import commonjs from '@rollup/plugin-commonjs' -import resolve from '@rollup/plugin-node-resolve' -import autoExternal from 'rollup-plugin-auto-external' -import sourcemaps from 'rollup-plugin-sourcemaps' -import typescript from 'rollup-plugin-typescript2' +import { baseConfig } from '@tiptap-shared/rollup-config' import pkg from './package.json' assert { type: 'json' } -export default { - external: [/@tiptap\/pm\/.*/], - input: 'src/index.ts', - output: [ - { - name: pkg.name, - file: pkg.umd, - format: 'umd', - sourcemap: true, - exports: 'named', - }, - { - name: pkg.name, - file: pkg.main, - format: 'cjs', - interop: 'compat', - sourcemap: true, - exports: 'named', - }, - { - name: pkg.name, - file: pkg.module, - format: 'es', - sourcemap: true, - exports: 'named', - }, - ], - plugins: [ - autoExternal({ - packagePath: './package.json', - }), - sourcemaps(), - resolve(), - commonjs(), - babel({ - babelHelpers: 'bundled', - exclude: '../../node_modules/**', - }), - typescript({ - tsconfig: '../../tsconfig.json', - tsconfigOverride: { - compilerOptions: { - declaration: true, - paths: { - '@tiptap/*': ['packages/*/src'], - }, - }, - include: null, - }, - }), - ], -} +export default baseConfig({ input: 'src/index.ts', pkg }) diff --git a/packages/extension-list-keymap/rollup.config.js b/packages/extension-list-keymap/rollup.config.js index 3394eaf7c..cb8e99403 100644 --- a/packages/extension-list-keymap/rollup.config.js +++ b/packages/extension-list-keymap/rollup.config.js @@ -1,61 +1,5 @@ -import babel from '@rollup/plugin-babel' -import commonjs from '@rollup/plugin-commonjs' -import resolve from '@rollup/plugin-node-resolve' -import autoExternal from 'rollup-plugin-auto-external' -import sourcemaps from 'rollup-plugin-sourcemaps' -import typescript from 'rollup-plugin-typescript2' +import { baseConfig } from '@tiptap-shared/rollup-config' import pkg from './package.json' assert { type: 'json' } -export default { - external: [/@tiptap\/pm\/.*/], - input: 'src/index.ts', - output: [ - { - name: pkg.name, - file: pkg.umd, - format: 'umd', - sourcemap: true, - exports: 'named', - }, - { - name: pkg.name, - file: pkg.main, - format: 'cjs', - interop: 'compat', - sourcemap: true, - exports: 'named', - }, - { - name: pkg.name, - file: pkg.module, - format: 'es', - sourcemap: true, - exports: 'named', - }, - ], - plugins: [ - autoExternal({ - packagePath: './package.json', - }), - sourcemaps(), - resolve(), - commonjs(), - babel({ - babelHelpers: 'bundled', - exclude: '../../node_modules/**', - }), - typescript({ - tsconfig: '../../tsconfig.json', - tsconfigOverride: { - compilerOptions: { - declaration: true, - paths: { - '@tiptap/*': ['packages/*/src'], - }, - }, - include: null, - }, - }), - ], -} +export default baseConfig({ input: 'src/index.ts', pkg }) diff --git a/packages/extension-mention/rollup.config.js b/packages/extension-mention/rollup.config.js index 3394eaf7c..cb8e99403 100644 --- a/packages/extension-mention/rollup.config.js +++ b/packages/extension-mention/rollup.config.js @@ -1,61 +1,5 @@ -import babel from '@rollup/plugin-babel' -import commonjs from '@rollup/plugin-commonjs' -import resolve from '@rollup/plugin-node-resolve' -import autoExternal from 'rollup-plugin-auto-external' -import sourcemaps from 'rollup-plugin-sourcemaps' -import typescript from 'rollup-plugin-typescript2' +import { baseConfig } from '@tiptap-shared/rollup-config' import pkg from './package.json' assert { type: 'json' } -export default { - external: [/@tiptap\/pm\/.*/], - input: 'src/index.ts', - output: [ - { - name: pkg.name, - file: pkg.umd, - format: 'umd', - sourcemap: true, - exports: 'named', - }, - { - name: pkg.name, - file: pkg.main, - format: 'cjs', - interop: 'compat', - sourcemap: true, - exports: 'named', - }, - { - name: pkg.name, - file: pkg.module, - format: 'es', - sourcemap: true, - exports: 'named', - }, - ], - plugins: [ - autoExternal({ - packagePath: './package.json', - }), - sourcemaps(), - resolve(), - commonjs(), - babel({ - babelHelpers: 'bundled', - exclude: '../../node_modules/**', - }), - typescript({ - tsconfig: '../../tsconfig.json', - tsconfigOverride: { - compilerOptions: { - declaration: true, - paths: { - '@tiptap/*': ['packages/*/src'], - }, - }, - include: null, - }, - }), - ], -} +export default baseConfig({ input: 'src/index.ts', pkg }) diff --git a/packages/extension-ordered-list/rollup.config.js b/packages/extension-ordered-list/rollup.config.js index 3394eaf7c..cb8e99403 100644 --- a/packages/extension-ordered-list/rollup.config.js +++ b/packages/extension-ordered-list/rollup.config.js @@ -1,61 +1,5 @@ -import babel from '@rollup/plugin-babel' -import commonjs from '@rollup/plugin-commonjs' -import resolve from '@rollup/plugin-node-resolve' -import autoExternal from 'rollup-plugin-auto-external' -import sourcemaps from 'rollup-plugin-sourcemaps' -import typescript from 'rollup-plugin-typescript2' +import { baseConfig } from '@tiptap-shared/rollup-config' import pkg from './package.json' assert { type: 'json' } -export default { - external: [/@tiptap\/pm\/.*/], - input: 'src/index.ts', - output: [ - { - name: pkg.name, - file: pkg.umd, - format: 'umd', - sourcemap: true, - exports: 'named', - }, - { - name: pkg.name, - file: pkg.main, - format: 'cjs', - interop: 'compat', - sourcemap: true, - exports: 'named', - }, - { - name: pkg.name, - file: pkg.module, - format: 'es', - sourcemap: true, - exports: 'named', - }, - ], - plugins: [ - autoExternal({ - packagePath: './package.json', - }), - sourcemaps(), - resolve(), - commonjs(), - babel({ - babelHelpers: 'bundled', - exclude: '../../node_modules/**', - }), - typescript({ - tsconfig: '../../tsconfig.json', - tsconfigOverride: { - compilerOptions: { - declaration: true, - paths: { - '@tiptap/*': ['packages/*/src'], - }, - }, - include: null, - }, - }), - ], -} +export default baseConfig({ input: 'src/index.ts', pkg }) diff --git a/packages/extension-paragraph/rollup.config.js b/packages/extension-paragraph/rollup.config.js index 3394eaf7c..cb8e99403 100644 --- a/packages/extension-paragraph/rollup.config.js +++ b/packages/extension-paragraph/rollup.config.js @@ -1,61 +1,5 @@ -import babel from '@rollup/plugin-babel' -import commonjs from '@rollup/plugin-commonjs' -import resolve from '@rollup/plugin-node-resolve' -import autoExternal from 'rollup-plugin-auto-external' -import sourcemaps from 'rollup-plugin-sourcemaps' -import typescript from 'rollup-plugin-typescript2' +import { baseConfig } from '@tiptap-shared/rollup-config' import pkg from './package.json' assert { type: 'json' } -export default { - external: [/@tiptap\/pm\/.*/], - input: 'src/index.ts', - output: [ - { - name: pkg.name, - file: pkg.umd, - format: 'umd', - sourcemap: true, - exports: 'named', - }, - { - name: pkg.name, - file: pkg.main, - format: 'cjs', - interop: 'compat', - sourcemap: true, - exports: 'named', - }, - { - name: pkg.name, - file: pkg.module, - format: 'es', - sourcemap: true, - exports: 'named', - }, - ], - plugins: [ - autoExternal({ - packagePath: './package.json', - }), - sourcemaps(), - resolve(), - commonjs(), - babel({ - babelHelpers: 'bundled', - exclude: '../../node_modules/**', - }), - typescript({ - tsconfig: '../../tsconfig.json', - tsconfigOverride: { - compilerOptions: { - declaration: true, - paths: { - '@tiptap/*': ['packages/*/src'], - }, - }, - include: null, - }, - }), - ], -} +export default baseConfig({ input: 'src/index.ts', pkg }) diff --git a/packages/extension-placeholder/rollup.config.js b/packages/extension-placeholder/rollup.config.js index 3394eaf7c..cb8e99403 100644 --- a/packages/extension-placeholder/rollup.config.js +++ b/packages/extension-placeholder/rollup.config.js @@ -1,61 +1,5 @@ -import babel from '@rollup/plugin-babel' -import commonjs from '@rollup/plugin-commonjs' -import resolve from '@rollup/plugin-node-resolve' -import autoExternal from 'rollup-plugin-auto-external' -import sourcemaps from 'rollup-plugin-sourcemaps' -import typescript from 'rollup-plugin-typescript2' +import { baseConfig } from '@tiptap-shared/rollup-config' import pkg from './package.json' assert { type: 'json' } -export default { - external: [/@tiptap\/pm\/.*/], - input: 'src/index.ts', - output: [ - { - name: pkg.name, - file: pkg.umd, - format: 'umd', - sourcemap: true, - exports: 'named', - }, - { - name: pkg.name, - file: pkg.main, - format: 'cjs', - interop: 'compat', - sourcemap: true, - exports: 'named', - }, - { - name: pkg.name, - file: pkg.module, - format: 'es', - sourcemap: true, - exports: 'named', - }, - ], - plugins: [ - autoExternal({ - packagePath: './package.json', - }), - sourcemaps(), - resolve(), - commonjs(), - babel({ - babelHelpers: 'bundled', - exclude: '../../node_modules/**', - }), - typescript({ - tsconfig: '../../tsconfig.json', - tsconfigOverride: { - compilerOptions: { - declaration: true, - paths: { - '@tiptap/*': ['packages/*/src'], - }, - }, - include: null, - }, - }), - ], -} +export default baseConfig({ input: 'src/index.ts', pkg }) diff --git a/packages/extension-strike/rollup.config.js b/packages/extension-strike/rollup.config.js index 3394eaf7c..cb8e99403 100644 --- a/packages/extension-strike/rollup.config.js +++ b/packages/extension-strike/rollup.config.js @@ -1,61 +1,5 @@ -import babel from '@rollup/plugin-babel' -import commonjs from '@rollup/plugin-commonjs' -import resolve from '@rollup/plugin-node-resolve' -import autoExternal from 'rollup-plugin-auto-external' -import sourcemaps from 'rollup-plugin-sourcemaps' -import typescript from 'rollup-plugin-typescript2' +import { baseConfig } from '@tiptap-shared/rollup-config' import pkg from './package.json' assert { type: 'json' } -export default { - external: [/@tiptap\/pm\/.*/], - input: 'src/index.ts', - output: [ - { - name: pkg.name, - file: pkg.umd, - format: 'umd', - sourcemap: true, - exports: 'named', - }, - { - name: pkg.name, - file: pkg.main, - format: 'cjs', - interop: 'compat', - sourcemap: true, - exports: 'named', - }, - { - name: pkg.name, - file: pkg.module, - format: 'es', - sourcemap: true, - exports: 'named', - }, - ], - plugins: [ - autoExternal({ - packagePath: './package.json', - }), - sourcemaps(), - resolve(), - commonjs(), - babel({ - babelHelpers: 'bundled', - exclude: '../../node_modules/**', - }), - typescript({ - tsconfig: '../../tsconfig.json', - tsconfigOverride: { - compilerOptions: { - declaration: true, - paths: { - '@tiptap/*': ['packages/*/src'], - }, - }, - include: null, - }, - }), - ], -} +export default baseConfig({ input: 'src/index.ts', pkg }) diff --git a/packages/extension-subscript/rollup.config.js b/packages/extension-subscript/rollup.config.js index 3394eaf7c..cb8e99403 100644 --- a/packages/extension-subscript/rollup.config.js +++ b/packages/extension-subscript/rollup.config.js @@ -1,61 +1,5 @@ -import babel from '@rollup/plugin-babel' -import commonjs from '@rollup/plugin-commonjs' -import resolve from '@rollup/plugin-node-resolve' -import autoExternal from 'rollup-plugin-auto-external' -import sourcemaps from 'rollup-plugin-sourcemaps' -import typescript from 'rollup-plugin-typescript2' +import { baseConfig } from '@tiptap-shared/rollup-config' import pkg from './package.json' assert { type: 'json' } -export default { - external: [/@tiptap\/pm\/.*/], - input: 'src/index.ts', - output: [ - { - name: pkg.name, - file: pkg.umd, - format: 'umd', - sourcemap: true, - exports: 'named', - }, - { - name: pkg.name, - file: pkg.main, - format: 'cjs', - interop: 'compat', - sourcemap: true, - exports: 'named', - }, - { - name: pkg.name, - file: pkg.module, - format: 'es', - sourcemap: true, - exports: 'named', - }, - ], - plugins: [ - autoExternal({ - packagePath: './package.json', - }), - sourcemaps(), - resolve(), - commonjs(), - babel({ - babelHelpers: 'bundled', - exclude: '../../node_modules/**', - }), - typescript({ - tsconfig: '../../tsconfig.json', - tsconfigOverride: { - compilerOptions: { - declaration: true, - paths: { - '@tiptap/*': ['packages/*/src'], - }, - }, - include: null, - }, - }), - ], -} +export default baseConfig({ input: 'src/index.ts', pkg }) diff --git a/packages/extension-superscript/rollup.config.js b/packages/extension-superscript/rollup.config.js index 3394eaf7c..cb8e99403 100644 --- a/packages/extension-superscript/rollup.config.js +++ b/packages/extension-superscript/rollup.config.js @@ -1,61 +1,5 @@ -import babel from '@rollup/plugin-babel' -import commonjs from '@rollup/plugin-commonjs' -import resolve from '@rollup/plugin-node-resolve' -import autoExternal from 'rollup-plugin-auto-external' -import sourcemaps from 'rollup-plugin-sourcemaps' -import typescript from 'rollup-plugin-typescript2' +import { baseConfig } from '@tiptap-shared/rollup-config' import pkg from './package.json' assert { type: 'json' } -export default { - external: [/@tiptap\/pm\/.*/], - input: 'src/index.ts', - output: [ - { - name: pkg.name, - file: pkg.umd, - format: 'umd', - sourcemap: true, - exports: 'named', - }, - { - name: pkg.name, - file: pkg.main, - format: 'cjs', - interop: 'compat', - sourcemap: true, - exports: 'named', - }, - { - name: pkg.name, - file: pkg.module, - format: 'es', - sourcemap: true, - exports: 'named', - }, - ], - plugins: [ - autoExternal({ - packagePath: './package.json', - }), - sourcemaps(), - resolve(), - commonjs(), - babel({ - babelHelpers: 'bundled', - exclude: '../../node_modules/**', - }), - typescript({ - tsconfig: '../../tsconfig.json', - tsconfigOverride: { - compilerOptions: { - declaration: true, - paths: { - '@tiptap/*': ['packages/*/src'], - }, - }, - include: null, - }, - }), - ], -} +export default baseConfig({ input: 'src/index.ts', pkg }) diff --git a/packages/extension-table-cell/rollup.config.js b/packages/extension-table-cell/rollup.config.js index 3394eaf7c..cb8e99403 100644 --- a/packages/extension-table-cell/rollup.config.js +++ b/packages/extension-table-cell/rollup.config.js @@ -1,61 +1,5 @@ -import babel from '@rollup/plugin-babel' -import commonjs from '@rollup/plugin-commonjs' -import resolve from '@rollup/plugin-node-resolve' -import autoExternal from 'rollup-plugin-auto-external' -import sourcemaps from 'rollup-plugin-sourcemaps' -import typescript from 'rollup-plugin-typescript2' +import { baseConfig } from '@tiptap-shared/rollup-config' import pkg from './package.json' assert { type: 'json' } -export default { - external: [/@tiptap\/pm\/.*/], - input: 'src/index.ts', - output: [ - { - name: pkg.name, - file: pkg.umd, - format: 'umd', - sourcemap: true, - exports: 'named', - }, - { - name: pkg.name, - file: pkg.main, - format: 'cjs', - interop: 'compat', - sourcemap: true, - exports: 'named', - }, - { - name: pkg.name, - file: pkg.module, - format: 'es', - sourcemap: true, - exports: 'named', - }, - ], - plugins: [ - autoExternal({ - packagePath: './package.json', - }), - sourcemaps(), - resolve(), - commonjs(), - babel({ - babelHelpers: 'bundled', - exclude: '../../node_modules/**', - }), - typescript({ - tsconfig: '../../tsconfig.json', - tsconfigOverride: { - compilerOptions: { - declaration: true, - paths: { - '@tiptap/*': ['packages/*/src'], - }, - }, - include: null, - }, - }), - ], -} +export default baseConfig({ input: 'src/index.ts', pkg }) diff --git a/packages/extension-table-header/rollup.config.js b/packages/extension-table-header/rollup.config.js index 3394eaf7c..cb8e99403 100644 --- a/packages/extension-table-header/rollup.config.js +++ b/packages/extension-table-header/rollup.config.js @@ -1,61 +1,5 @@ -import babel from '@rollup/plugin-babel' -import commonjs from '@rollup/plugin-commonjs' -import resolve from '@rollup/plugin-node-resolve' -import autoExternal from 'rollup-plugin-auto-external' -import sourcemaps from 'rollup-plugin-sourcemaps' -import typescript from 'rollup-plugin-typescript2' +import { baseConfig } from '@tiptap-shared/rollup-config' import pkg from './package.json' assert { type: 'json' } -export default { - external: [/@tiptap\/pm\/.*/], - input: 'src/index.ts', - output: [ - { - name: pkg.name, - file: pkg.umd, - format: 'umd', - sourcemap: true, - exports: 'named', - }, - { - name: pkg.name, - file: pkg.main, - format: 'cjs', - interop: 'compat', - sourcemap: true, - exports: 'named', - }, - { - name: pkg.name, - file: pkg.module, - format: 'es', - sourcemap: true, - exports: 'named', - }, - ], - plugins: [ - autoExternal({ - packagePath: './package.json', - }), - sourcemaps(), - resolve(), - commonjs(), - babel({ - babelHelpers: 'bundled', - exclude: '../../node_modules/**', - }), - typescript({ - tsconfig: '../../tsconfig.json', - tsconfigOverride: { - compilerOptions: { - declaration: true, - paths: { - '@tiptap/*': ['packages/*/src'], - }, - }, - include: null, - }, - }), - ], -} +export default baseConfig({ input: 'src/index.ts', pkg }) diff --git a/packages/extension-table-row/rollup.config.js b/packages/extension-table-row/rollup.config.js index 3394eaf7c..cb8e99403 100644 --- a/packages/extension-table-row/rollup.config.js +++ b/packages/extension-table-row/rollup.config.js @@ -1,61 +1,5 @@ -import babel from '@rollup/plugin-babel' -import commonjs from '@rollup/plugin-commonjs' -import resolve from '@rollup/plugin-node-resolve' -import autoExternal from 'rollup-plugin-auto-external' -import sourcemaps from 'rollup-plugin-sourcemaps' -import typescript from 'rollup-plugin-typescript2' +import { baseConfig } from '@tiptap-shared/rollup-config' import pkg from './package.json' assert { type: 'json' } -export default { - external: [/@tiptap\/pm\/.*/], - input: 'src/index.ts', - output: [ - { - name: pkg.name, - file: pkg.umd, - format: 'umd', - sourcemap: true, - exports: 'named', - }, - { - name: pkg.name, - file: pkg.main, - format: 'cjs', - interop: 'compat', - sourcemap: true, - exports: 'named', - }, - { - name: pkg.name, - file: pkg.module, - format: 'es', - sourcemap: true, - exports: 'named', - }, - ], - plugins: [ - autoExternal({ - packagePath: './package.json', - }), - sourcemaps(), - resolve(), - commonjs(), - babel({ - babelHelpers: 'bundled', - exclude: '../../node_modules/**', - }), - typescript({ - tsconfig: '../../tsconfig.json', - tsconfigOverride: { - compilerOptions: { - declaration: true, - paths: { - '@tiptap/*': ['packages/*/src'], - }, - }, - include: null, - }, - }), - ], -} +export default baseConfig({ input: 'src/index.ts', pkg }) diff --git a/packages/extension-table/rollup.config.js b/packages/extension-table/rollup.config.js index 3394eaf7c..cb8e99403 100644 --- a/packages/extension-table/rollup.config.js +++ b/packages/extension-table/rollup.config.js @@ -1,61 +1,5 @@ -import babel from '@rollup/plugin-babel' -import commonjs from '@rollup/plugin-commonjs' -import resolve from '@rollup/plugin-node-resolve' -import autoExternal from 'rollup-plugin-auto-external' -import sourcemaps from 'rollup-plugin-sourcemaps' -import typescript from 'rollup-plugin-typescript2' +import { baseConfig } from '@tiptap-shared/rollup-config' import pkg from './package.json' assert { type: 'json' } -export default { - external: [/@tiptap\/pm\/.*/], - input: 'src/index.ts', - output: [ - { - name: pkg.name, - file: pkg.umd, - format: 'umd', - sourcemap: true, - exports: 'named', - }, - { - name: pkg.name, - file: pkg.main, - format: 'cjs', - interop: 'compat', - sourcemap: true, - exports: 'named', - }, - { - name: pkg.name, - file: pkg.module, - format: 'es', - sourcemap: true, - exports: 'named', - }, - ], - plugins: [ - autoExternal({ - packagePath: './package.json', - }), - sourcemaps(), - resolve(), - commonjs(), - babel({ - babelHelpers: 'bundled', - exclude: '../../node_modules/**', - }), - typescript({ - tsconfig: '../../tsconfig.json', - tsconfigOverride: { - compilerOptions: { - declaration: true, - paths: { - '@tiptap/*': ['packages/*/src'], - }, - }, - include: null, - }, - }), - ], -} +export default baseConfig({ input: 'src/index.ts', pkg }) diff --git a/packages/extension-task-item/rollup.config.js b/packages/extension-task-item/rollup.config.js index 3394eaf7c..cb8e99403 100644 --- a/packages/extension-task-item/rollup.config.js +++ b/packages/extension-task-item/rollup.config.js @@ -1,61 +1,5 @@ -import babel from '@rollup/plugin-babel' -import commonjs from '@rollup/plugin-commonjs' -import resolve from '@rollup/plugin-node-resolve' -import autoExternal from 'rollup-plugin-auto-external' -import sourcemaps from 'rollup-plugin-sourcemaps' -import typescript from 'rollup-plugin-typescript2' +import { baseConfig } from '@tiptap-shared/rollup-config' import pkg from './package.json' assert { type: 'json' } -export default { - external: [/@tiptap\/pm\/.*/], - input: 'src/index.ts', - output: [ - { - name: pkg.name, - file: pkg.umd, - format: 'umd', - sourcemap: true, - exports: 'named', - }, - { - name: pkg.name, - file: pkg.main, - format: 'cjs', - interop: 'compat', - sourcemap: true, - exports: 'named', - }, - { - name: pkg.name, - file: pkg.module, - format: 'es', - sourcemap: true, - exports: 'named', - }, - ], - plugins: [ - autoExternal({ - packagePath: './package.json', - }), - sourcemaps(), - resolve(), - commonjs(), - babel({ - babelHelpers: 'bundled', - exclude: '../../node_modules/**', - }), - typescript({ - tsconfig: '../../tsconfig.json', - tsconfigOverride: { - compilerOptions: { - declaration: true, - paths: { - '@tiptap/*': ['packages/*/src'], - }, - }, - include: null, - }, - }), - ], -} +export default baseConfig({ input: 'src/index.ts', pkg }) diff --git a/packages/extension-task-list/rollup.config.js b/packages/extension-task-list/rollup.config.js index 3394eaf7c..cb8e99403 100644 --- a/packages/extension-task-list/rollup.config.js +++ b/packages/extension-task-list/rollup.config.js @@ -1,61 +1,5 @@ -import babel from '@rollup/plugin-babel' -import commonjs from '@rollup/plugin-commonjs' -import resolve from '@rollup/plugin-node-resolve' -import autoExternal from 'rollup-plugin-auto-external' -import sourcemaps from 'rollup-plugin-sourcemaps' -import typescript from 'rollup-plugin-typescript2' +import { baseConfig } from '@tiptap-shared/rollup-config' import pkg from './package.json' assert { type: 'json' } -export default { - external: [/@tiptap\/pm\/.*/], - input: 'src/index.ts', - output: [ - { - name: pkg.name, - file: pkg.umd, - format: 'umd', - sourcemap: true, - exports: 'named', - }, - { - name: pkg.name, - file: pkg.main, - format: 'cjs', - interop: 'compat', - sourcemap: true, - exports: 'named', - }, - { - name: pkg.name, - file: pkg.module, - format: 'es', - sourcemap: true, - exports: 'named', - }, - ], - plugins: [ - autoExternal({ - packagePath: './package.json', - }), - sourcemaps(), - resolve(), - commonjs(), - babel({ - babelHelpers: 'bundled', - exclude: '../../node_modules/**', - }), - typescript({ - tsconfig: '../../tsconfig.json', - tsconfigOverride: { - compilerOptions: { - declaration: true, - paths: { - '@tiptap/*': ['packages/*/src'], - }, - }, - include: null, - }, - }), - ], -} +export default baseConfig({ input: 'src/index.ts', pkg }) diff --git a/packages/extension-text-align/rollup.config.js b/packages/extension-text-align/rollup.config.js index 3394eaf7c..cb8e99403 100644 --- a/packages/extension-text-align/rollup.config.js +++ b/packages/extension-text-align/rollup.config.js @@ -1,61 +1,5 @@ -import babel from '@rollup/plugin-babel' -import commonjs from '@rollup/plugin-commonjs' -import resolve from '@rollup/plugin-node-resolve' -import autoExternal from 'rollup-plugin-auto-external' -import sourcemaps from 'rollup-plugin-sourcemaps' -import typescript from 'rollup-plugin-typescript2' +import { baseConfig } from '@tiptap-shared/rollup-config' import pkg from './package.json' assert { type: 'json' } -export default { - external: [/@tiptap\/pm\/.*/], - input: 'src/index.ts', - output: [ - { - name: pkg.name, - file: pkg.umd, - format: 'umd', - sourcemap: true, - exports: 'named', - }, - { - name: pkg.name, - file: pkg.main, - format: 'cjs', - interop: 'compat', - sourcemap: true, - exports: 'named', - }, - { - name: pkg.name, - file: pkg.module, - format: 'es', - sourcemap: true, - exports: 'named', - }, - ], - plugins: [ - autoExternal({ - packagePath: './package.json', - }), - sourcemaps(), - resolve(), - commonjs(), - babel({ - babelHelpers: 'bundled', - exclude: '../../node_modules/**', - }), - typescript({ - tsconfig: '../../tsconfig.json', - tsconfigOverride: { - compilerOptions: { - declaration: true, - paths: { - '@tiptap/*': ['packages/*/src'], - }, - }, - include: null, - }, - }), - ], -} +export default baseConfig({ input: 'src/index.ts', pkg }) diff --git a/packages/extension-text-style/rollup.config.js b/packages/extension-text-style/rollup.config.js index 3394eaf7c..cb8e99403 100644 --- a/packages/extension-text-style/rollup.config.js +++ b/packages/extension-text-style/rollup.config.js @@ -1,61 +1,5 @@ -import babel from '@rollup/plugin-babel' -import commonjs from '@rollup/plugin-commonjs' -import resolve from '@rollup/plugin-node-resolve' -import autoExternal from 'rollup-plugin-auto-external' -import sourcemaps from 'rollup-plugin-sourcemaps' -import typescript from 'rollup-plugin-typescript2' +import { baseConfig } from '@tiptap-shared/rollup-config' import pkg from './package.json' assert { type: 'json' } -export default { - external: [/@tiptap\/pm\/.*/], - input: 'src/index.ts', - output: [ - { - name: pkg.name, - file: pkg.umd, - format: 'umd', - sourcemap: true, - exports: 'named', - }, - { - name: pkg.name, - file: pkg.main, - format: 'cjs', - interop: 'compat', - sourcemap: true, - exports: 'named', - }, - { - name: pkg.name, - file: pkg.module, - format: 'es', - sourcemap: true, - exports: 'named', - }, - ], - plugins: [ - autoExternal({ - packagePath: './package.json', - }), - sourcemaps(), - resolve(), - commonjs(), - babel({ - babelHelpers: 'bundled', - exclude: '../../node_modules/**', - }), - typescript({ - tsconfig: '../../tsconfig.json', - tsconfigOverride: { - compilerOptions: { - declaration: true, - paths: { - '@tiptap/*': ['packages/*/src'], - }, - }, - include: null, - }, - }), - ], -} +export default baseConfig({ input: 'src/index.ts', pkg }) diff --git a/packages/extension-text/rollup.config.js b/packages/extension-text/rollup.config.js index 3394eaf7c..cb8e99403 100644 --- a/packages/extension-text/rollup.config.js +++ b/packages/extension-text/rollup.config.js @@ -1,61 +1,5 @@ -import babel from '@rollup/plugin-babel' -import commonjs from '@rollup/plugin-commonjs' -import resolve from '@rollup/plugin-node-resolve' -import autoExternal from 'rollup-plugin-auto-external' -import sourcemaps from 'rollup-plugin-sourcemaps' -import typescript from 'rollup-plugin-typescript2' +import { baseConfig } from '@tiptap-shared/rollup-config' import pkg from './package.json' assert { type: 'json' } -export default { - external: [/@tiptap\/pm\/.*/], - input: 'src/index.ts', - output: [ - { - name: pkg.name, - file: pkg.umd, - format: 'umd', - sourcemap: true, - exports: 'named', - }, - { - name: pkg.name, - file: pkg.main, - format: 'cjs', - interop: 'compat', - sourcemap: true, - exports: 'named', - }, - { - name: pkg.name, - file: pkg.module, - format: 'es', - sourcemap: true, - exports: 'named', - }, - ], - plugins: [ - autoExternal({ - packagePath: './package.json', - }), - sourcemaps(), - resolve(), - commonjs(), - babel({ - babelHelpers: 'bundled', - exclude: '../../node_modules/**', - }), - typescript({ - tsconfig: '../../tsconfig.json', - tsconfigOverride: { - compilerOptions: { - declaration: true, - paths: { - '@tiptap/*': ['packages/*/src'], - }, - }, - include: null, - }, - }), - ], -} +export default baseConfig({ input: 'src/index.ts', pkg }) diff --git a/packages/extension-typography/rollup.config.js b/packages/extension-typography/rollup.config.js index 3394eaf7c..cb8e99403 100644 --- a/packages/extension-typography/rollup.config.js +++ b/packages/extension-typography/rollup.config.js @@ -1,61 +1,5 @@ -import babel from '@rollup/plugin-babel' -import commonjs from '@rollup/plugin-commonjs' -import resolve from '@rollup/plugin-node-resolve' -import autoExternal from 'rollup-plugin-auto-external' -import sourcemaps from 'rollup-plugin-sourcemaps' -import typescript from 'rollup-plugin-typescript2' +import { baseConfig } from '@tiptap-shared/rollup-config' import pkg from './package.json' assert { type: 'json' } -export default { - external: [/@tiptap\/pm\/.*/], - input: 'src/index.ts', - output: [ - { - name: pkg.name, - file: pkg.umd, - format: 'umd', - sourcemap: true, - exports: 'named', - }, - { - name: pkg.name, - file: pkg.main, - format: 'cjs', - interop: 'compat', - sourcemap: true, - exports: 'named', - }, - { - name: pkg.name, - file: pkg.module, - format: 'es', - sourcemap: true, - exports: 'named', - }, - ], - plugins: [ - autoExternal({ - packagePath: './package.json', - }), - sourcemaps(), - resolve(), - commonjs(), - babel({ - babelHelpers: 'bundled', - exclude: '../../node_modules/**', - }), - typescript({ - tsconfig: '../../tsconfig.json', - tsconfigOverride: { - compilerOptions: { - declaration: true, - paths: { - '@tiptap/*': ['packages/*/src'], - }, - }, - include: null, - }, - }), - ], -} +export default baseConfig({ input: 'src/index.ts', pkg }) diff --git a/packages/extension-underline/rollup.config.js b/packages/extension-underline/rollup.config.js index 3394eaf7c..cb8e99403 100644 --- a/packages/extension-underline/rollup.config.js +++ b/packages/extension-underline/rollup.config.js @@ -1,61 +1,5 @@ -import babel from '@rollup/plugin-babel' -import commonjs from '@rollup/plugin-commonjs' -import resolve from '@rollup/plugin-node-resolve' -import autoExternal from 'rollup-plugin-auto-external' -import sourcemaps from 'rollup-plugin-sourcemaps' -import typescript from 'rollup-plugin-typescript2' +import { baseConfig } from '@tiptap-shared/rollup-config' import pkg from './package.json' assert { type: 'json' } -export default { - external: [/@tiptap\/pm\/.*/], - input: 'src/index.ts', - output: [ - { - name: pkg.name, - file: pkg.umd, - format: 'umd', - sourcemap: true, - exports: 'named', - }, - { - name: pkg.name, - file: pkg.main, - format: 'cjs', - interop: 'compat', - sourcemap: true, - exports: 'named', - }, - { - name: pkg.name, - file: pkg.module, - format: 'es', - sourcemap: true, - exports: 'named', - }, - ], - plugins: [ - autoExternal({ - packagePath: './package.json', - }), - sourcemaps(), - resolve(), - commonjs(), - babel({ - babelHelpers: 'bundled', - exclude: '../../node_modules/**', - }), - typescript({ - tsconfig: '../../tsconfig.json', - tsconfigOverride: { - compilerOptions: { - declaration: true, - paths: { - '@tiptap/*': ['packages/*/src'], - }, - }, - include: null, - }, - }), - ], -} +export default baseConfig({ input: 'src/index.ts', pkg }) diff --git a/packages/extension-youtube/rollup.config.js b/packages/extension-youtube/rollup.config.js index 3394eaf7c..cb8e99403 100644 --- a/packages/extension-youtube/rollup.config.js +++ b/packages/extension-youtube/rollup.config.js @@ -1,61 +1,5 @@ -import babel from '@rollup/plugin-babel' -import commonjs from '@rollup/plugin-commonjs' -import resolve from '@rollup/plugin-node-resolve' -import autoExternal from 'rollup-plugin-auto-external' -import sourcemaps from 'rollup-plugin-sourcemaps' -import typescript from 'rollup-plugin-typescript2' +import { baseConfig } from '@tiptap-shared/rollup-config' import pkg from './package.json' assert { type: 'json' } -export default { - external: [/@tiptap\/pm\/.*/], - input: 'src/index.ts', - output: [ - { - name: pkg.name, - file: pkg.umd, - format: 'umd', - sourcemap: true, - exports: 'named', - }, - { - name: pkg.name, - file: pkg.main, - format: 'cjs', - interop: 'compat', - sourcemap: true, - exports: 'named', - }, - { - name: pkg.name, - file: pkg.module, - format: 'es', - sourcemap: true, - exports: 'named', - }, - ], - plugins: [ - autoExternal({ - packagePath: './package.json', - }), - sourcemaps(), - resolve(), - commonjs(), - babel({ - babelHelpers: 'bundled', - exclude: '../../node_modules/**', - }), - typescript({ - tsconfig: '../../tsconfig.json', - tsconfigOverride: { - compilerOptions: { - declaration: true, - paths: { - '@tiptap/*': ['packages/*/src'], - }, - }, - include: null, - }, - }), - ], -} +export default baseConfig({ input: 'src/index.ts', pkg }) diff --git a/packages/html/rollup.config.js b/packages/html/rollup.config.js index 3394eaf7c..cb8e99403 100644 --- a/packages/html/rollup.config.js +++ b/packages/html/rollup.config.js @@ -1,61 +1,5 @@ -import babel from '@rollup/plugin-babel' -import commonjs from '@rollup/plugin-commonjs' -import resolve from '@rollup/plugin-node-resolve' -import autoExternal from 'rollup-plugin-auto-external' -import sourcemaps from 'rollup-plugin-sourcemaps' -import typescript from 'rollup-plugin-typescript2' +import { baseConfig } from '@tiptap-shared/rollup-config' import pkg from './package.json' assert { type: 'json' } -export default { - external: [/@tiptap\/pm\/.*/], - input: 'src/index.ts', - output: [ - { - name: pkg.name, - file: pkg.umd, - format: 'umd', - sourcemap: true, - exports: 'named', - }, - { - name: pkg.name, - file: pkg.main, - format: 'cjs', - interop: 'compat', - sourcemap: true, - exports: 'named', - }, - { - name: pkg.name, - file: pkg.module, - format: 'es', - sourcemap: true, - exports: 'named', - }, - ], - plugins: [ - autoExternal({ - packagePath: './package.json', - }), - sourcemaps(), - resolve(), - commonjs(), - babel({ - babelHelpers: 'bundled', - exclude: '../../node_modules/**', - }), - typescript({ - tsconfig: '../../tsconfig.json', - tsconfigOverride: { - compilerOptions: { - declaration: true, - paths: { - '@tiptap/*': ['packages/*/src'], - }, - }, - include: null, - }, - }), - ], -} +export default baseConfig({ input: 'src/index.ts', pkg }) diff --git a/packages/react/rollup.config.js b/packages/react/rollup.config.js index 3394eaf7c..cb8e99403 100644 --- a/packages/react/rollup.config.js +++ b/packages/react/rollup.config.js @@ -1,61 +1,5 @@ -import babel from '@rollup/plugin-babel' -import commonjs from '@rollup/plugin-commonjs' -import resolve from '@rollup/plugin-node-resolve' -import autoExternal from 'rollup-plugin-auto-external' -import sourcemaps from 'rollup-plugin-sourcemaps' -import typescript from 'rollup-plugin-typescript2' +import { baseConfig } from '@tiptap-shared/rollup-config' import pkg from './package.json' assert { type: 'json' } -export default { - external: [/@tiptap\/pm\/.*/], - input: 'src/index.ts', - output: [ - { - name: pkg.name, - file: pkg.umd, - format: 'umd', - sourcemap: true, - exports: 'named', - }, - { - name: pkg.name, - file: pkg.main, - format: 'cjs', - interop: 'compat', - sourcemap: true, - exports: 'named', - }, - { - name: pkg.name, - file: pkg.module, - format: 'es', - sourcemap: true, - exports: 'named', - }, - ], - plugins: [ - autoExternal({ - packagePath: './package.json', - }), - sourcemaps(), - resolve(), - commonjs(), - babel({ - babelHelpers: 'bundled', - exclude: '../../node_modules/**', - }), - typescript({ - tsconfig: '../../tsconfig.json', - tsconfigOverride: { - compilerOptions: { - declaration: true, - paths: { - '@tiptap/*': ['packages/*/src'], - }, - }, - include: null, - }, - }), - ], -} +export default baseConfig({ input: 'src/index.ts', pkg }) diff --git a/packages/starter-kit/rollup.config.js b/packages/starter-kit/rollup.config.js index 3394eaf7c..cb8e99403 100644 --- a/packages/starter-kit/rollup.config.js +++ b/packages/starter-kit/rollup.config.js @@ -1,61 +1,5 @@ -import babel from '@rollup/plugin-babel' -import commonjs from '@rollup/plugin-commonjs' -import resolve from '@rollup/plugin-node-resolve' -import autoExternal from 'rollup-plugin-auto-external' -import sourcemaps from 'rollup-plugin-sourcemaps' -import typescript from 'rollup-plugin-typescript2' +import { baseConfig } from '@tiptap-shared/rollup-config' import pkg from './package.json' assert { type: 'json' } -export default { - external: [/@tiptap\/pm\/.*/], - input: 'src/index.ts', - output: [ - { - name: pkg.name, - file: pkg.umd, - format: 'umd', - sourcemap: true, - exports: 'named', - }, - { - name: pkg.name, - file: pkg.main, - format: 'cjs', - interop: 'compat', - sourcemap: true, - exports: 'named', - }, - { - name: pkg.name, - file: pkg.module, - format: 'es', - sourcemap: true, - exports: 'named', - }, - ], - plugins: [ - autoExternal({ - packagePath: './package.json', - }), - sourcemaps(), - resolve(), - commonjs(), - babel({ - babelHelpers: 'bundled', - exclude: '../../node_modules/**', - }), - typescript({ - tsconfig: '../../tsconfig.json', - tsconfigOverride: { - compilerOptions: { - declaration: true, - paths: { - '@tiptap/*': ['packages/*/src'], - }, - }, - include: null, - }, - }), - ], -} +export default baseConfig({ input: 'src/index.ts', pkg }) diff --git a/packages/suggestion/rollup.config.js b/packages/suggestion/rollup.config.js index 3394eaf7c..cb8e99403 100644 --- a/packages/suggestion/rollup.config.js +++ b/packages/suggestion/rollup.config.js @@ -1,61 +1,5 @@ -import babel from '@rollup/plugin-babel' -import commonjs from '@rollup/plugin-commonjs' -import resolve from '@rollup/plugin-node-resolve' -import autoExternal from 'rollup-plugin-auto-external' -import sourcemaps from 'rollup-plugin-sourcemaps' -import typescript from 'rollup-plugin-typescript2' +import { baseConfig } from '@tiptap-shared/rollup-config' import pkg from './package.json' assert { type: 'json' } -export default { - external: [/@tiptap\/pm\/.*/], - input: 'src/index.ts', - output: [ - { - name: pkg.name, - file: pkg.umd, - format: 'umd', - sourcemap: true, - exports: 'named', - }, - { - name: pkg.name, - file: pkg.main, - format: 'cjs', - interop: 'compat', - sourcemap: true, - exports: 'named', - }, - { - name: pkg.name, - file: pkg.module, - format: 'es', - sourcemap: true, - exports: 'named', - }, - ], - plugins: [ - autoExternal({ - packagePath: './package.json', - }), - sourcemaps(), - resolve(), - commonjs(), - babel({ - babelHelpers: 'bundled', - exclude: '../../node_modules/**', - }), - typescript({ - tsconfig: '../../tsconfig.json', - tsconfigOverride: { - compilerOptions: { - declaration: true, - paths: { - '@tiptap/*': ['packages/*/src'], - }, - }, - include: null, - }, - }), - ], -} +export default baseConfig({ input: 'src/index.ts', pkg }) diff --git a/packages/vue-2/rollup.config.js b/packages/vue-2/rollup.config.js index 3394eaf7c..cb8e99403 100644 --- a/packages/vue-2/rollup.config.js +++ b/packages/vue-2/rollup.config.js @@ -1,61 +1,5 @@ -import babel from '@rollup/plugin-babel' -import commonjs from '@rollup/plugin-commonjs' -import resolve from '@rollup/plugin-node-resolve' -import autoExternal from 'rollup-plugin-auto-external' -import sourcemaps from 'rollup-plugin-sourcemaps' -import typescript from 'rollup-plugin-typescript2' +import { baseConfig } from '@tiptap-shared/rollup-config' import pkg from './package.json' assert { type: 'json' } -export default { - external: [/@tiptap\/pm\/.*/], - input: 'src/index.ts', - output: [ - { - name: pkg.name, - file: pkg.umd, - format: 'umd', - sourcemap: true, - exports: 'named', - }, - { - name: pkg.name, - file: pkg.main, - format: 'cjs', - interop: 'compat', - sourcemap: true, - exports: 'named', - }, - { - name: pkg.name, - file: pkg.module, - format: 'es', - sourcemap: true, - exports: 'named', - }, - ], - plugins: [ - autoExternal({ - packagePath: './package.json', - }), - sourcemaps(), - resolve(), - commonjs(), - babel({ - babelHelpers: 'bundled', - exclude: '../../node_modules/**', - }), - typescript({ - tsconfig: '../../tsconfig.json', - tsconfigOverride: { - compilerOptions: { - declaration: true, - paths: { - '@tiptap/*': ['packages/*/src'], - }, - }, - include: null, - }, - }), - ], -} +export default baseConfig({ input: 'src/index.ts', pkg }) diff --git a/packages/vue-3/rollup.config.js b/packages/vue-3/rollup.config.js index 3394eaf7c..cb8e99403 100644 --- a/packages/vue-3/rollup.config.js +++ b/packages/vue-3/rollup.config.js @@ -1,61 +1,5 @@ -import babel from '@rollup/plugin-babel' -import commonjs from '@rollup/plugin-commonjs' -import resolve from '@rollup/plugin-node-resolve' -import autoExternal from 'rollup-plugin-auto-external' -import sourcemaps from 'rollup-plugin-sourcemaps' -import typescript from 'rollup-plugin-typescript2' +import { baseConfig } from '@tiptap-shared/rollup-config' import pkg from './package.json' assert { type: 'json' } -export default { - external: [/@tiptap\/pm\/.*/], - input: 'src/index.ts', - output: [ - { - name: pkg.name, - file: pkg.umd, - format: 'umd', - sourcemap: true, - exports: 'named', - }, - { - name: pkg.name, - file: pkg.main, - format: 'cjs', - interop: 'compat', - sourcemap: true, - exports: 'named', - }, - { - name: pkg.name, - file: pkg.module, - format: 'es', - sourcemap: true, - exports: 'named', - }, - ], - plugins: [ - autoExternal({ - packagePath: './package.json', - }), - sourcemaps(), - resolve(), - commonjs(), - babel({ - babelHelpers: 'bundled', - exclude: '../../node_modules/**', - }), - typescript({ - tsconfig: '../../tsconfig.json', - tsconfigOverride: { - compilerOptions: { - declaration: true, - paths: { - '@tiptap/*': ['packages/*/src'], - }, - }, - include: null, - }, - }), - ], -} +export default baseConfig({ input: 'src/index.ts', pkg }) diff --git a/shared/rollup-config/index.js b/shared/rollup-config/index.js new file mode 100644 index 000000000..5a5703510 --- /dev/null +++ b/shared/rollup-config/index.js @@ -0,0 +1,62 @@ +import babel from '@rollup/plugin-babel' +import commonjs from '@rollup/plugin-commonjs' +import resolve from '@rollup/plugin-node-resolve' +import autoExternal from 'rollup-plugin-auto-external' +import sourcemaps from 'rollup-plugin-sourcemaps' +import typescript from 'rollup-plugin-typescript2' + +export const baseConfig = ({ + input = 'src/index.ts', + pkg, +}) => ({ + external: [/@tiptap\/pm\/.*/], + input, + output: [ + { + name: pkg.name, + file: pkg.umd, + format: 'umd', + sourcemap: true, + exports: 'named', + }, + { + name: pkg.name, + file: pkg.main, + format: 'cjs', + interop: 'compat', + sourcemap: true, + exports: 'named', + }, + { + name: pkg.name, + file: pkg.module, + format: 'es', + sourcemap: true, + exports: 'named', + }, + ], + plugins: [ + autoExternal({ + packagePath: './package.json', + }), + sourcemaps(), + resolve(), + commonjs(), + babel({ + babelHelpers: 'bundled', + exclude: '../../node_modules/**', + }), + typescript({ + tsconfig: '../../tsconfig.json', + tsconfigOverride: { + compilerOptions: { + declaration: true, + paths: { + '@tiptap/*': ['packages/*/src'], + }, + }, + include: null, + }, + }), + ], +}) diff --git a/shared/rollup-config/package.json b/shared/rollup-config/package.json new file mode 100644 index 000000000..f6b1ee219 --- /dev/null +++ b/shared/rollup-config/package.json @@ -0,0 +1,6 @@ +{ + "name": "@tiptap-shared/rollup-config", + "private": true, + "main": "index.js", + "type": "module" +}