size-limit
Advanced tools
Comparing version 11.0.2 to 11.0.3
@@ -85,2 +85,11 @@ import bytes from 'bytes-iec' | ||
/** | ||
* Dynamically imports a module from a given file path | ||
* and returns its default export. | ||
* | ||
* @param {string} filePath - The path to the module file to be imported. | ||
* @returns {Promise<any>} A promise that resolves with the default export of the module. | ||
*/ | ||
const dynamicImport = async filePath => (await import(filePath)).default | ||
export default async function getConfig(plugins, process, args, pkg) { | ||
@@ -116,2 +125,6 @@ let config = { | ||
let explorer = lilconfig('size-limit', { | ||
loaders: { | ||
'.js': dynamicImport, | ||
'.mjs': dynamicImport | ||
}, | ||
searchPlaces: [ | ||
@@ -122,2 +135,3 @@ 'package.json', | ||
'.size-limit.js', | ||
'.size-limit.mjs', | ||
'.size-limit.cjs' | ||
@@ -124,0 +138,0 @@ ] |
{ | ||
"name": "size-limit", | ||
"version": "11.0.2", | ||
"version": "11.0.3", | ||
"description": "CLI tool for Size Limit", | ||
@@ -27,5 +27,5 @@ "type": "module", | ||
"bytes-iec": "^3.1.1", | ||
"chokidar": "^3.5.3", | ||
"globby": "^14.0.0", | ||
"lilconfig": "^3.0.0", | ||
"chokidar": "^3.6.0", | ||
"globby": "^14.0.1", | ||
"lilconfig": "^3.1.1", | ||
"nanospinner": "^1.1.0", | ||
@@ -32,0 +32,0 @@ "picocolors": "^1.0.0" |
32487
882
Updatedchokidar@^3.6.0
Updatedglobby@^14.0.1
Updatedlilconfig@^3.1.1