Skip to content

Commit

Permalink
Manually define __filename
Browse files Browse the repository at this point in the history
  • Loading branch information
aryaemami59 committed Mar 12, 2024
1 parent 9cc2224 commit 99b3d50
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion packages/size-limit/get-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,13 @@ import _jiti from 'jiti'
import { lilconfig } from 'lilconfig'
import { createRequire } from 'node:module'
import { dirname, isAbsolute, join, relative } from 'node:path'

import { fileURLToPath } from 'node:url'
import { SizeLimitError } from './size-limit-error.js'

const require = createRequire(import.meta.url)

const __filename = fileURLToPath(import.meta.url)

const jiti = _jiti(__filename, { interopDefault: true })

let OPTIONS = {
Expand Down

0 comments on commit 99b3d50

Please sign in to comment.