diff --git a/bun.lockb b/bun.lockb index 6bfc209..a9e88fc 100755 Binary files a/bun.lockb and b/bun.lockb differ diff --git a/lib/utils.js b/lib/utils.js index 75e120d..30a6db0 100644 --- a/lib/utils.js +++ b/lib/utils.js @@ -6,7 +6,7 @@ import { toString } from 'mdast-util-to-string' import path from 'path' import fs from 'fs' -import * as dirTree from 'directory-tree' +const dirTree = require("directory-tree"); class Util { _counter @@ -229,12 +229,12 @@ class Util { const children = [] const slugs = this.getAllSlugs() - function findFunc(slug) { - const fileName = Transformer.parseFileNameFromPath(this.toFilePath(slug)) + function findFunc(_this, slug) { + const fileName = Transformer.parseFileNameFromPath(_this.toFilePath(slug)) return Transformer.normalizeFileName(fileName) === Transformer.normalizeFileName(thisObject.name) } - const foundSlugs = slugs.find(slug => findFunc(slug)) + const foundSlugs = slugs.find(slug => findFunc(this, slug)) let routerPath = foundSlugs !== (null | undefined) ? foundSlugs : null diff --git a/package.json b/package.json index a33e7a7..4ef619d 100644 --- a/package.json +++ b/package.json @@ -65,7 +65,6 @@ "cytoscape": "latest", "eslint": "^8.0.1", "eslint-config-next": "latest", - "postcss": "^8.4.32", "remark-frontmatter": "latest", "remark-react": "latest", "remark-stringify": "latest",