File tree Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -51,7 +51,9 @@ const collectPackageJsonExports = (
5151 * @returns A promise that resolves to an array of unique package entry points.
5252 */
5353const getAllPackageEntryPoints = async ( ) => {
54- const packageJson = await import ( './package.json' , { with : { type : 'json' } } )
54+ const packageJson = (
55+ await import ( './package.json' , { with : { type : 'json' } } )
56+ ) . default
5557
5658 const packageExports = collectPackageJsonExports ( packageJson . exports )
5759
@@ -73,7 +75,9 @@ const getAllImportsForEntryPoint = async (
7375 entryPoint : string ,
7476 index : number ,
7577) : Promise < SizeLimitConfig > => {
76- const allNamedImports = Object . keys ( await import ( entryPoint ) )
78+ const allNamedImports = Object . keys ( await import ( entryPoint ) ) . filter (
79+ ( namedImport ) => namedImport !== 'default' ,
80+ )
7781
7882 return allNamedImports
7983 . map < Check > ( ( namedImport ) => ( {
@@ -142,7 +146,9 @@ const getAllImportsWithNodeEnv = async (nodeEnv: NodeEnv) => {
142146 * @returns A promise that resolves to the size limit configuration object.
143147 */
144148const getSizeLimitConfig = async ( ) : Promise < SizeLimitConfig > => {
145- const packageJson = await import ( './package.json' , { with : { type : 'json' } } )
149+ const packageJson = (
150+ await import ( './package.json' , { with : { type : 'json' } } )
151+ ) . default
146152
147153 const sizeLimitConfig = (
148154 await Promise . all ( allNodeEnvs . map ( getAllImportsWithNodeEnv ) )
You can’t perform that action at this time.
0 commit comments