mirror of
https://github.com/egoist/tsup.git
synced 2026-02-01 16:57:42 +00:00
10 lines
312 B
JavaScript
10 lines
312 B
JavaScript
// Shim globals in esm bundle
|
|
import { fileURLToPath } from 'url'
|
|
import path from 'path'
|
|
|
|
const getFilename = () => fileURLToPath(import.meta.url)
|
|
const getDirname = () => path.dirname(getFilename())
|
|
|
|
export const __dirname = /* @__PURE__ */ getDirname()
|
|
export const __filename = /* @__PURE__ */ getFilename()
|