Skip to content

Commit 047a071

Browse files
committed
Remove Node ESM setup from tsup.config.ts
1 parent 35dd78e commit 047a071

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

tsup.config.ts

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import fs from 'node:fs'
22
import path from 'node:path'
3-
import { fileURLToPath } from 'node:url'
43
import type { Options } from 'tsup'
54
import { defineConfig } from 'tsup'
65

@@ -16,12 +15,8 @@ if (process.env.NODE_ENV === 'production') {
1615
)
1716
}
1817

19-
// No __dirname under Node ESM
20-
const __filename = fileURLToPath(import.meta.url)
21-
const __dirname = path.dirname(__filename)
22-
2318
const tsconfig = path.join(
24-
__dirname,
19+
import.meta.dirname,
2520
'./tsconfig.build.json',
2621
) satisfies Options['tsconfig']
2722

0 commit comments

Comments
 (0)