Skip to content

Commit

Permalink
fix(swagger): avoid join error issue by return default string value w…
Browse files Browse the repository at this point in the history
…hen import.meta.dirname isn't available

fix issue with jest
  • Loading branch information
Romakita committed Jan 18, 2025
1 parent 4b7592d commit e2a5c09
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/specs/swagger/src/constants.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import {getValue} from "@tsed/core";
import {join} from "path";
import getAbsoluteFSPath from "swagger-ui-dist/absolute-path.js";

export const SWAGGER_UI_DIST = getAbsoluteFSPath();
export const ROOT_DIR = join(import.meta.dirname, "..");
export const ROOT_DIR = join(getValue(import.meta, "dirname", ""), "..");

0 comments on commit e2a5c09

Please sign in to comment.