Skip to content

Commit 119bac5

Browse files
committed
fix: package.json path
1 parent 5d7a5e2 commit 119bac5

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

index.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,11 @@
88
"use strict";
99

1010
const requireIndex = require("requireindex");
11+
const path = require("node:path");
1112

12-
// @ts-expect-error -- ESM/TypeScript conversion should fix this.
13-
const pkg = require("./package.json");
13+
const pkg = __dirname.includes("/dist/")
14+
? require(path.join(__dirname, "..", "package.json"))
15+
: require(path.join(__dirname, "package.json"));
1416

1517
module.exports = {
1618
meta: {

0 commit comments

Comments
 (0)