From 69d22d2d3c3b3064641e0a1ba66a0a9ada90d6bd Mon Sep 17 00:00:00 2001 From: Sinclair Chen Date: Mon, 22 Aug 2022 04:52:31 -0700 Subject: [PATCH] fix: let StarterKit be imported as cjs module (#2967) --- packages/starter-kit/src/index.ts | 1 + packages/starter-kit/src/starter-kit.ts | 36 ++++++++++++------------- 2 files changed, 19 insertions(+), 18 deletions(-) diff --git a/packages/starter-kit/src/index.ts b/packages/starter-kit/src/index.ts index 8af0e2b1770..7e4dafc7e45 100644 --- a/packages/starter-kit/src/index.ts +++ b/packages/starter-kit/src/index.ts @@ -1,5 +1,6 @@ import { StarterKit } from './starter-kit' export type { StarterKitOptions } from './starter-kit' +export * from './starter-kit' export default StarterKit diff --git a/packages/starter-kit/src/starter-kit.ts b/packages/starter-kit/src/starter-kit.ts index c05a434b6a3..b917543f0fd 100644 --- a/packages/starter-kit/src/starter-kit.ts +++ b/packages/starter-kit/src/starter-kit.ts @@ -1,22 +1,22 @@ import { Extension } from '@tiptap/core' -import Blockquote, { BlockquoteOptions } from '@tiptap/extension-blockquote' -import Bold, { BoldOptions } from '@tiptap/extension-bold' -import BulletList, { BulletListOptions } from '@tiptap/extension-bullet-list' -import Code, { CodeOptions } from '@tiptap/extension-code' -import CodeBlock, { CodeBlockOptions } from '@tiptap/extension-code-block' -import Document from '@tiptap/extension-document' -import Dropcursor, { DropcursorOptions } from '@tiptap/extension-dropcursor' -import Gapcursor from '@tiptap/extension-gapcursor' -import HardBreak, { HardBreakOptions } from '@tiptap/extension-hard-break' -import Heading, { HeadingOptions } from '@tiptap/extension-heading' -import History, { HistoryOptions } from '@tiptap/extension-history' -import HorizontalRule, { HorizontalRuleOptions } from '@tiptap/extension-horizontal-rule' -import Italic, { ItalicOptions } from '@tiptap/extension-italic' -import ListItem, { ListItemOptions } from '@tiptap/extension-list-item' -import OrderedList, { OrderedListOptions } from '@tiptap/extension-ordered-list' -import Paragraph, { ParagraphOptions } from '@tiptap/extension-paragraph' -import Strike, { StrikeOptions } from '@tiptap/extension-strike' -import Text from '@tiptap/extension-text' +import { Blockquote, BlockquoteOptions } from '@tiptap/extension-blockquote' +import { Bold, BoldOptions } from '@tiptap/extension-bold' +import { BulletList, BulletListOptions } from '@tiptap/extension-bullet-list' +import { Code, CodeOptions } from '@tiptap/extension-code' +import { CodeBlock, CodeBlockOptions } from '@tiptap/extension-code-block' +import { Document } from '@tiptap/extension-document' +import { Dropcursor, DropcursorOptions } from '@tiptap/extension-dropcursor' +import { Gapcursor } from '@tiptap/extension-gapcursor' +import { HardBreak, HardBreakOptions } from '@tiptap/extension-hard-break' +import { Heading, HeadingOptions } from '@tiptap/extension-heading' +import { History, HistoryOptions } from '@tiptap/extension-history' +import { HorizontalRule, HorizontalRuleOptions } from '@tiptap/extension-horizontal-rule' +import { Italic, ItalicOptions } from '@tiptap/extension-italic' +import { ListItem, ListItemOptions } from '@tiptap/extension-list-item' +import { OrderedList, OrderedListOptions } from '@tiptap/extension-ordered-list' +import { Paragraph, ParagraphOptions } from '@tiptap/extension-paragraph' +import { Strike, StrikeOptions } from '@tiptap/extension-strike' +import { Text } from '@tiptap/extension-text' export interface StarterKitOptions { blockquote: Partial | false,