Skip to content

Commit 6a492c7

Browse files
authored
Update jiti usage to support Top-Level await syntax (#378)
* Bump `jiti` to version 2.4.2 * Update `jiti.import()` usage
1 parent 4a4de65 commit 6a492c7

File tree

3 files changed

+66
-66
lines changed

3 files changed

+66
-66
lines changed

packages/size-limit/get-config.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -92,9 +92,9 @@ const tsLoader = async filePath => {
9292
interopDefault: false
9393
})
9494

95-
let config = await jiti.import(filePath)
95+
let config = await jiti.import(filePath, { default: true })
9696

97-
return config?.default ?? config
97+
return config
9898
}
9999

100100
export default async function getConfig(plugins, process, args, pkg) {

packages/size-limit/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
"dependencies": {
2727
"bytes-iec": "^3.1.1",
2828
"chokidar": "^4.0.1",
29-
"jiti": "^2.1.0",
29+
"jiti": "^2.4.2",
3030
"lilconfig": "^3.1.2",
3131
"nanospinner": "^1.1.0",
3232
"picocolors": "^1.1.0",

pnpm-lock.yaml

+63-63
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)