Skip to content

Commit

Permalink
build: resolve default exports properly in cjs
Browse files Browse the repository at this point in the history
  • Loading branch information
nperez0111 committed Jul 17, 2024
1 parent e1946c8 commit dd7f9ac
Show file tree
Hide file tree
Showing 55 changed files with 271 additions and 54 deletions.
58 changes: 58 additions & 0 deletions .changeset/angry-trains-thank.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
---
"@tiptap/extension-collaboration-cursor": patch
"@tiptap/extension-code-block-lowlight": patch
"@tiptap/extension-character-count": patch
"@tiptap/extension-horizontal-rule": patch
"@tiptap/extension-collaboration": patch
"@tiptap/extension-floating-menu": patch
"@tiptap/extension-ordered-list": patch
"@tiptap/extension-table-header": patch
"@tiptap/extension-bubble-menu": patch
"@tiptap/extension-bullet-list": patch
"@tiptap/extension-font-family": patch
"@tiptap/extension-list-keymap": patch
"@tiptap/extension-placeholder": patch
"@tiptap/extension-superscript": patch
"@tiptap/extension-blockquote": patch
"@tiptap/extension-code-block": patch
"@tiptap/extension-dropcursor": patch
"@tiptap/extension-hard-break": patch
"@tiptap/extension-table-cell": patch
"@tiptap/extension-text-align": patch
"@tiptap/extension-text-style": patch
"@tiptap/extension-typography": patch
"@tiptap/extension-gapcursor": patch
"@tiptap/extension-highlight": patch
"@tiptap/extension-list-item": patch
"@tiptap/extension-paragraph": patch
"@tiptap/extension-subscript": patch
"@tiptap/extension-table-row": patch
"@tiptap/extension-task-item": patch
"@tiptap/extension-task-list": patch
"@tiptap/extension-underline": patch
"@tiptap/extension-document": patch
"@tiptap/extension-heading": patch
"@tiptap/extension-history": patch
"@tiptap/extension-mention": patch
"@tiptap/extension-youtube": patch
"@tiptap/extension-italic": patch
"@tiptap/extension-strike": patch
"@tiptap/extension-color": patch
"@tiptap/extension-focus": patch
"@tiptap/extension-image": patch
"@tiptap/extension-table": patch
"@tiptap/extension-bold": patch
"@tiptap/extension-code": patch
"@tiptap/extension-link": patch
"@tiptap/extension-text": patch
"@tiptap/starter-kit": patch
"@tiptap/suggestion": patch
"@tiptap/react": patch
"@tiptap/vue-2": patch
"@tiptap/vue-3": patch
"@tiptap/core": patch
"@tiptap/html": patch
"@tiptap/pm": patch
---

There was an issue with the cjs bundling of packages and default exports, now we resolve default exports in legacy compatible way
5 changes: 4 additions & 1 deletion packages/core/rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,19 +16,22 @@ export default {
file: pkg.umd,
format: 'umd',
sourcemap: true,
exports: 'named',
},
{
name: pkg.name,
file: pkg.main,
format: 'cjs',
interop: 'compat',
sourcemap: true,
exports: 'auto',
exports: 'named',
},
{
name: pkg.name,
file: pkg.module,
format: 'es',
sourcemap: true,
exports: 'named',
},
],
plugins: [
Expand Down
5 changes: 4 additions & 1 deletion packages/extension-blockquote/rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,19 +16,22 @@ export default {
file: pkg.umd,
format: 'umd',
sourcemap: true,
exports: 'named',
},
{
name: pkg.name,
file: pkg.main,
format: 'cjs',
interop: 'compat',
sourcemap: true,
exports: 'auto',
exports: 'named',
},
{
name: pkg.name,
file: pkg.module,
format: 'es',
sourcemap: true,
exports: 'named',
},
],
plugins: [
Expand Down
5 changes: 4 additions & 1 deletion packages/extension-bold/rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,19 +16,22 @@ export default {
file: pkg.umd,
format: 'umd',
sourcemap: true,
exports: 'named',
},
{
name: pkg.name,
file: pkg.main,
format: 'cjs',
interop: 'compat',
sourcemap: true,
exports: 'auto',
exports: 'named',
},
{
name: pkg.name,
file: pkg.module,
format: 'es',
sourcemap: true,
exports: 'named',
},
],
plugins: [
Expand Down
5 changes: 4 additions & 1 deletion packages/extension-bubble-menu/rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,19 +16,22 @@ export default {
file: pkg.umd,
format: 'umd',
sourcemap: true,
exports: 'named',
},
{
name: pkg.name,
file: pkg.main,
format: 'cjs',
interop: 'compat',
sourcemap: true,
exports: 'auto',
exports: 'named',
},
{
name: pkg.name,
file: pkg.module,
format: 'es',
sourcemap: true,
exports: 'named',
},
],
plugins: [
Expand Down
5 changes: 4 additions & 1 deletion packages/extension-bullet-list/rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,19 +16,22 @@ export default {
file: pkg.umd,
format: 'umd',
sourcemap: true,
exports: 'named',
},
{
name: pkg.name,
file: pkg.main,
format: 'cjs',
interop: 'compat',
sourcemap: true,
exports: 'auto',
exports: 'named',
},
{
name: pkg.name,
file: pkg.module,
format: 'es',
sourcemap: true,
exports: 'named',
},
],
plugins: [
Expand Down
5 changes: 4 additions & 1 deletion packages/extension-character-count/rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,19 +16,22 @@ export default {
file: pkg.umd,
format: 'umd',
sourcemap: true,
exports: 'named',
},
{
name: pkg.name,
file: pkg.main,
format: 'cjs',
interop: 'compat',
sourcemap: true,
exports: 'auto',
exports: 'named',
},
{
name: pkg.name,
file: pkg.module,
format: 'es',
sourcemap: true,
exports: 'named',
},
],
plugins: [
Expand Down
5 changes: 4 additions & 1 deletion packages/extension-code-block-lowlight/rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,19 +16,22 @@ export default {
file: pkg.umd,
format: 'umd',
sourcemap: true,
exports: 'named',
},
{
name: pkg.name,
file: pkg.main,
format: 'cjs',
interop: 'compat',
sourcemap: true,
exports: 'auto',
exports: 'named',
},
{
name: pkg.name,
file: pkg.module,
format: 'es',
sourcemap: true,
exports: 'named',
},
],
plugins: [
Expand Down
5 changes: 4 additions & 1 deletion packages/extension-code-block/rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,19 +16,22 @@ export default {
file: pkg.umd,
format: 'umd',
sourcemap: true,
exports: 'named',
},
{
name: pkg.name,
file: pkg.main,
format: 'cjs',
interop: 'compat',
sourcemap: true,
exports: 'auto',
exports: 'named',
},
{
name: pkg.name,
file: pkg.module,
format: 'es',
sourcemap: true,
exports: 'named',
},
],
plugins: [
Expand Down
5 changes: 4 additions & 1 deletion packages/extension-code/rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,19 +16,22 @@ export default {
file: pkg.umd,
format: 'umd',
sourcemap: true,
exports: 'named',
},
{
name: pkg.name,
file: pkg.main,
format: 'cjs',
interop: 'compat',
sourcemap: true,
exports: 'auto',
exports: 'named',
},
{
name: pkg.name,
file: pkg.module,
format: 'es',
sourcemap: true,
exports: 'named',
},
],
plugins: [
Expand Down
5 changes: 4 additions & 1 deletion packages/extension-collaboration-cursor/rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,19 +16,22 @@ export default {
file: pkg.umd,
format: 'umd',
sourcemap: true,
exports: 'named',
},
{
name: pkg.name,
file: pkg.main,
format: 'cjs',
interop: 'compat',
sourcemap: true,
exports: 'auto',
exports: 'named',
},
{
name: pkg.name,
file: pkg.module,
format: 'es',
sourcemap: true,
exports: 'named',
},
],
plugins: [
Expand Down
5 changes: 4 additions & 1 deletion packages/extension-collaboration/rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,19 +16,22 @@ export default {
file: pkg.umd,
format: 'umd',
sourcemap: true,
exports: 'named',
},
{
name: pkg.name,
file: pkg.main,
format: 'cjs',
interop: 'compat',
sourcemap: true,
exports: 'auto',
exports: 'named',
},
{
name: pkg.name,
file: pkg.module,
format: 'es',
sourcemap: true,
exports: 'named',
},
],
plugins: [
Expand Down
5 changes: 4 additions & 1 deletion packages/extension-color/rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,19 +16,22 @@ export default {
file: pkg.umd,
format: 'umd',
sourcemap: true,
exports: 'named',
},
{
name: pkg.name,
file: pkg.main,
format: 'cjs',
interop: 'compat',
sourcemap: true,
exports: 'auto',
exports: 'named',
},
{
name: pkg.name,
file: pkg.module,
format: 'es',
sourcemap: true,
exports: 'named',
},
],
plugins: [
Expand Down
5 changes: 4 additions & 1 deletion packages/extension-document/rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,19 +16,22 @@ export default {
file: pkg.umd,
format: 'umd',
sourcemap: true,
exports: 'named',
},
{
name: pkg.name,
file: pkg.main,
format: 'cjs',
interop: 'compat',
sourcemap: true,
exports: 'auto',
exports: 'named',
},
{
name: pkg.name,
file: pkg.module,
format: 'es',
sourcemap: true,
exports: 'named',
},
],
plugins: [
Expand Down
5 changes: 4 additions & 1 deletion packages/extension-dropcursor/rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,19 +16,22 @@ export default {
file: pkg.umd,
format: 'umd',
sourcemap: true,
exports: 'named',
},
{
name: pkg.name,
file: pkg.main,
format: 'cjs',
interop: 'compat',
sourcemap: true,
exports: 'auto',
exports: 'named',
},
{
name: pkg.name,
file: pkg.module,
format: 'es',
sourcemap: true,
exports: 'named',
},
],
plugins: [
Expand Down
Loading

0 comments on commit dd7f9ac

Please sign in to comment.