File tree Expand file tree Collapse file tree 4 files changed +8
-4
lines changed Expand file tree Collapse file tree 4 files changed +8
-4
lines changed Original file line number Diff line number Diff line change 1
1
import path from 'node:path'
2
+ import { fileURLToPath } from 'node:url'
2
3
import { createTypeDocApp } from './typedoc-markdown.mjs'
3
4
4
- const __dirname = path . dirname ( new URL ( import . meta. url ) . pathname )
5
+ const __dirname = path . dirname ( fileURLToPath ( import . meta. url ) )
5
6
6
7
createTypeDocApp ( {
7
8
name : 'API Documentation' ,
Original file line number Diff line number Diff line change 1
1
// @ts -check
2
2
import fs from 'node:fs/promises'
3
3
import path from 'node:path'
4
+ import { fileURLToPath } from 'node:url'
4
5
import { Application , PageEvent , TSConfigReader } from 'typedoc'
5
6
6
- const __dirname = path . dirname ( new URL ( import . meta. url ) . pathname )
7
+ const __dirname = path . dirname ( fileURLToPath ( import . meta. url ) )
7
8
8
9
const DEFAULT_OPTIONS = {
9
10
// disableOutputCheck: true,
Original file line number Diff line number Diff line change 1
1
import path from 'node:path'
2
+ import { fileURLToPath } from 'node:url'
2
3
import ts from 'rollup-plugin-typescript2'
3
4
import replace from '@rollup/plugin-replace'
4
5
import resolve from '@rollup/plugin-node-resolve'
5
6
import commonjs from '@rollup/plugin-commonjs'
6
7
import terser from '@rollup/plugin-terser'
7
8
import { defineConfig } from 'rollup'
8
9
9
- const __dirname = path . dirname ( new URL ( import . meta. url ) . pathname )
10
+ const __dirname = path . dirname ( fileURLToPath ( import . meta. url ) )
10
11
11
12
const config = defineConfig ( {
12
13
external : [ 'vue' ] ,
Original file line number Diff line number Diff line change 1
1
import fs from 'node:fs/promises'
2
2
import path from 'node:path'
3
+ import { fileURLToPath } from 'node:url'
3
4
import chalk from 'chalk'
4
5
import { gzipSync } from 'zlib'
5
6
import { compress } from 'brotli'
6
7
7
- const __dirname = path . dirname ( new URL ( import . meta. url ) . pathname )
8
+ const __dirname = path . dirname ( fileURLToPath ( import . meta. url ) )
8
9
9
10
async function checkFileSize ( filePath ) {
10
11
const stat = await fs . stat ( filePath ) . catch ( ( ) => null )
You can’t perform that action at this time.
0 commit comments