import path from 'node:path'
+import { fileURLToPath } from 'node:url'
import { createTypeDocApp } from './typedoc-markdown.mjs'
-const __dirname = path.dirname(new URL(import.meta.url).pathname)
+const __dirname = path.dirname(fileURLToPath(import.meta.url))
createTypeDocApp({
name: 'API Documentation',
// @ts-check
import fs from 'node:fs/promises'
import path from 'node:path'
+import {fileURLToPath} from 'node:url'
import { Application, PageEvent, TSConfigReader } from 'typedoc'
-const __dirname = path.dirname(new URL(import.meta.url).pathname)
+const __dirname = path.dirname(fileURLToPath(import.meta.url))
const DEFAULT_OPTIONS = {
// disableOutputCheck: true,
import path from 'node:path'
+import {fileURLToPath} from 'node:url'
import ts from 'rollup-plugin-typescript2'
import replace from '@rollup/plugin-replace'
import resolve from '@rollup/plugin-node-resolve'
import terser from '@rollup/plugin-terser'
import { defineConfig } from 'rollup'
-const __dirname = path.dirname(new URL(import.meta.url).pathname)
+const __dirname = path.dirname(fileURLToPath(import.meta.url))
const config = defineConfig({
external: ['vue'],
import fs from 'node:fs/promises'
import path from 'node:path'
+import {fileURLToPath} from 'node:url'
import chalk from 'chalk'
import { gzipSync } from 'zlib'
import { compress } from 'brotli'
-const __dirname = path.dirname(new URL(import.meta.url).pathname)
+const __dirname = path.dirname(fileURLToPath(import.meta.url))
async function checkFileSize(filePath) {
const stat = await fs.stat(filePath).catch(() => null)