Skip to content

Commit 3c6df6e

Browse files
committed
chore: use ESM equivalent of __dirname
1 parent 3c4763c commit 3c6df6e

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

src/utils/bundle-component.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
import path from 'path';
2+
import * as url from 'url';
23

34
import type { ComponentLoader } from 'adminjs';
45

6+
const __dirname = url.fileURLToPath(new URL('.', import.meta.url));
7+
58
export const bundleComponent = (
69
loader: ComponentLoader,
710
componentName: string

0 commit comments

Comments
 (0)