From c74fd8d258f0c883ccddf23880a5a2b2cae7336f Mon Sep 17 00:00:00 2001 From: 3y3 <3y3@ya.ru> Date: Tue, 24 Sep 2024 23:39:33 +0300 Subject: [PATCH] fix: Fix typescript bundler mode --- scripts/ts-paths.js | 2 +- src/services/metadata/utils.ts | 2 +- tests/tsconfig.json | 3 ++- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/scripts/ts-paths.js b/scripts/ts-paths.js index 96923f2b..b97c3fd6 100644 --- a/scripts/ts-paths.js +++ b/scripts/ts-paths.js @@ -1,4 +1,4 @@ -const {resolve, join} = require('path'); +const {resolve} = require('path'); const {readFileSync} = require('fs'); const {sync: glob} = require('glob'); const normalize = require('normalize-path'); diff --git a/src/services/metadata/utils.ts b/src/services/metadata/utils.ts index b24a8310..174862cb 100644 --- a/src/services/metadata/utils.ts +++ b/src/services/metadata/utils.ts @@ -1,4 +1,4 @@ -import {CARRIAGE_RETURN} from '~/constants'; +import {CARRIAGE_RETURN} from '../../constants'; // IMO, we should just always apply this at the end of the whole processing pipeline, // not when dumping meta/front matter diff --git a/tests/tsconfig.json b/tests/tsconfig.json index 886757aa..40e1635e 100644 --- a/tests/tsconfig.json +++ b/tests/tsconfig.json @@ -5,7 +5,8 @@ "module": "NodeNext", "esModuleInterop": true, "paths": { - "*": ["../src/*"] + "*": ["../src/*"], + "~/*": ["../src/*"] }, "types": ["node", "jest"] }