From 8cb4d047b95d4c3d07a60891e22e6a683148dc1a Mon Sep 17 00:00:00 2001 From: Dragory <2606411+Dragory@users.noreply.github.com> Date: Sun, 11 Aug 2024 02:10:55 +0300 Subject: [PATCH] feat: fix issues importing /backend in other packages --- backend/package.json | 3 +++ backend/src/profiler.ts | 2 +- backend/tsconfig.json | 3 ++- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/backend/package.json b/backend/package.json index c16e3c00..4ee7e76b 100644 --- a/backend/package.json +++ b/backend/package.json @@ -4,6 +4,9 @@ "description": "", "private": true, "type": "module", + "exports": { + "./*": "./dist/*" + }, "scripts": { "watch": "tsc-watch --build --onSuccess \"node start-dev.js\"", "watch-yaml-parse-test": "tsc-watch --build --onSuccess \"node dist/yamlParseTest.js\"", diff --git a/backend/src/profiler.ts b/backend/src/profiler.ts index e0b03f20..fba379b0 100644 --- a/backend/src/profiler.ts +++ b/backend/src/profiler.ts @@ -3,7 +3,7 @@ import type { Knub } from "knub"; type Profiler = Knub["profiler"]; let profiler: Profiler | null = null; -export function getProfiler() { +export function getProfiler(): Profiler|null { return profiler; } diff --git a/backend/tsconfig.json b/backend/tsconfig.json index b012223a..17e10137 100644 --- a/backend/tsconfig.json +++ b/backend/tsconfig.json @@ -5,7 +5,8 @@ "module": "NodeNext", "baseUrl": "./src", "rootDir": "./src", - "outDir": "./dist" + "outDir": "./dist", + "composite": true }, "include": ["src/**/*.ts", "src/**/*.json"], "references": [