From 8e71ce0c50d2ceb7175b4645168c84583eb7e1a7 Mon Sep 17 00:00:00 2001 From: Palanikannan1437 <73993394+Palanikannan1437@users.noreply.github.com> Date: Wed, 20 Sep 2023 19:03:06 +0530 Subject: [PATCH] finally fixed import errors --- packages/editor/package.json | 26 +++++++++------------- packages/editor/tsconfig.json | 16 +++++++++---- web/components/issues/description-form.tsx | 2 +- 3 files changed, 24 insertions(+), 20 deletions(-) diff --git a/packages/editor/package.json b/packages/editor/package.json index 49a1c2d2b..58f191cb4 100644 --- a/packages/editor/package.json +++ b/packages/editor/package.json @@ -2,19 +2,22 @@ "name": "@plane/editor", "version": "0.0.1", "description": "Rich Text Editor that powers Plane", - "main": "dist/index.js", + "main": "dist/index", + "types": "dist/index", "source": "src/index.ts", - "module": "dist/index.mjs", - "types": "dist/index.d.mts", "files": [ "dist" ], "exports": { ".": { - "types": "./dist/index.d.mts", - "import": "./dist/index.mjs", - "module": "./dist/index.mjs", - "require": "./dist/index.js" + "import": { + "types": "./dist/index.d.mts", + "default": "./dist/module.mjs" + }, + "require": { + "types": "./dist/index.d.ts", + "default": "./dist/main.js" + } } }, "scripts": { @@ -81,12 +84,5 @@ "markdown", "nextjs", "react" - ], - "typesVersions": { - "*": { - "*": [ - "src/*" - ] - } - } + ] } diff --git a/packages/editor/tsconfig.json b/packages/editor/tsconfig.json index 9799dcdfc..bf38514e1 100644 --- a/packages/editor/tsconfig.json +++ b/packages/editor/tsconfig.json @@ -1,12 +1,20 @@ { "extends": "tsconfig/react.json", - "include": ["."], - "exclude": ["dist", "build", "node_modules"], - + "include": [ + "src/**/*", + "index.d.ts" + ], + "exclude": [ + "dist", + "build", + "node_modules" + ], "compilerOptions": { "baseUrl": ".", "paths": { - "@/*": ["src/*"] + "@/*": [ + "src/*" + ] } } } diff --git a/web/components/issues/description-form.tsx b/web/components/issues/description-form.tsx index f4ec6c268..7606dee97 100644 --- a/web/components/issues/description-form.tsx +++ b/web/components/issues/description-form.tsx @@ -9,7 +9,7 @@ import { useDebouncedCallback } from "use-debounce"; import { TextArea } from "components/ui"; // types import { IIssue } from "types"; -import { TiptapEditor } from "@plane/editor" +import { TiptapEditor } from "@plane/editor"; import fileService from "services/file.service"; export interface IssueDescriptionFormValues {