Skip to content

Commit

Permalink
fix(remark): fix windows ERR_UNSUPPORTED_ESM_URL_SCHEME error
Browse files Browse the repository at this point in the history
  • Loading branch information
tgreyuk committed Jan 1, 2025
1 parent e14f7e6 commit 94e8016
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
1 change: 0 additions & 1 deletion .changeset/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
"typedoc-github-wiki-theme",
"typedoc-gitlab-wiki-theme",
"typedoc-vitepress-theme",
"typedoc-plugin-remark",
"typedoc-plugin-frontmatter"
]
}
5 changes: 5 additions & 0 deletions .changeset/healthy-hats-joke.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'typedoc-plugin-remark': patch
---

- Fix windows ERR_UNSUPPORTED_ESM_URL_SCHEME error (#752).
4 changes: 2 additions & 2 deletions packages/typedoc-plugin-remark/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
import * as path from 'path';
import { DeclarationOption } from 'typedoc';
import { MarkdownApplication } from 'typedoc-plugin-markdown';
import { fileURLToPath } from 'url';
import { fileURLToPath, pathToFileURL } from 'url';
import { getDefaultPlugins } from './helpers/get-default-plugins.js';
import * as options from './options/declarations.js';
import { parse } from './parse.js';
Expand Down Expand Up @@ -48,7 +48,7 @@ export function load(app: MarkdownApplication) {
? tocPlugin[1]
: {};
defaultPlugins.push([
path.join(__dirname, 'plugins', 'add-toc.js'),
pathToFileURL(path.join(__dirname, 'plugins', 'add-toc.js')).href,
{
reflection: urlMapping.model,
typedocOptions: app.options,
Expand Down

0 comments on commit 94e8016

Please sign in to comment.