From 6d73dccf816a8cc9d9c253b4167626e10ad4826b Mon Sep 17 00:00:00 2001 From: Yifei Date: Wed, 25 Oct 2023 09:06:57 +0000 Subject: [PATCH] feat(xxx): reproduction of bug/problem? --- apps/nextjs-app/src/features/demo/pages/DemoPage.tsx | 3 ++- packages/core-lib/src/bar.ts | 3 +++ packages/core-lib/src/foo.ts | 6 ++++++ packages/core-lib/src/index.ts | 2 ++ packages/core-lib/tsconfig.json | 3 ++- 5 files changed, 15 insertions(+), 2 deletions(-) create mode 100644 packages/core-lib/src/bar.ts create mode 100644 packages/core-lib/src/foo.ts diff --git a/apps/nextjs-app/src/features/demo/pages/DemoPage.tsx b/apps/nextjs-app/src/features/demo/pages/DemoPage.tsx index 63574d65e95..793032dd706 100644 --- a/apps/nextjs-app/src/features/demo/pages/DemoPage.tsx +++ b/apps/nextjs-app/src/features/demo/pages/DemoPage.tsx @@ -1,4 +1,4 @@ -import { sayHello } from '@your-org/core-lib'; +import { sayHello, foo } from '@your-org/core-lib'; import { AsyncMessage, Message } from '@your-org/ui-lib'; import Image from 'next/image'; import { useTranslation } from 'next-i18next'; @@ -21,6 +21,7 @@ export const DemoPage: FC = () => {

I'm the web-app

+
  • {`Foo says: ${sayHello('World')} from @your-org/core-lib`}
  • diff --git a/packages/core-lib/src/bar.ts b/packages/core-lib/src/bar.ts new file mode 100644 index 00000000000..6288485491c --- /dev/null +++ b/packages/core-lib/src/bar.ts @@ -0,0 +1,3 @@ +export function bar(): void { + console.log('BAR!'); +} diff --git a/packages/core-lib/src/foo.ts b/packages/core-lib/src/foo.ts new file mode 100644 index 00000000000..db9aa297654 --- /dev/null +++ b/packages/core-lib/src/foo.ts @@ -0,0 +1,6 @@ +import { bar } from '@/bar'; + +export function foo() { + console.log('FOO!'); + bar(); +} diff --git a/packages/core-lib/src/index.ts b/packages/core-lib/src/index.ts index 8edc8b237ed..f808ab00d6a 100644 --- a/packages/core-lib/src/index.ts +++ b/packages/core-lib/src/index.ts @@ -1,3 +1,5 @@ export const sayHello = (name: string): string => { return `I'm the @your-org/ui-lib component telling ${name} !`; }; + +export * from './foo'; diff --git a/packages/core-lib/tsconfig.json b/packages/core-lib/tsconfig.json index 1bd12dda918..cf9949c394c 100644 --- a/packages/core-lib/tsconfig.json +++ b/packages/core-lib/tsconfig.json @@ -11,7 +11,8 @@ "incremental": true, "paths": { "@/test-utils": ["../config/test/test-utils"], - "@your-org/ts-utils": ["../../../packages/ts-utils/src/index"] + "@your-org/ts-utils": ["../../../packages/ts-utils/src/index"], + "@/*": ["./*"] }, "types": ["jest", "vitest/globals"] },