File tree 1 file changed +9
-3
lines changed
1 file changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -51,7 +51,9 @@ const collectPackageJsonExports = (
51
51
* @returns A promise that resolves to an array of unique package entry points.
52
52
*/
53
53
const 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
55
57
56
58
const packageExports = collectPackageJsonExports ( packageJson . exports )
57
59
@@ -73,7 +75,9 @@ const getAllImportsForEntryPoint = async (
73
75
entryPoint : string ,
74
76
index : number ,
75
77
) : Promise < SizeLimitConfig > => {
76
- const allNamedImports = Object . keys ( await import ( entryPoint ) )
78
+ const allNamedImports = Object . keys ( await import ( entryPoint ) ) . filter (
79
+ ( namedImport ) => namedImport !== 'default' ,
80
+ )
77
81
78
82
return allNamedImports
79
83
. map < Check > ( ( namedImport ) => ( {
@@ -142,7 +146,9 @@ const getAllImportsWithNodeEnv = async (nodeEnv: NodeEnv) => {
142
146
* @returns A promise that resolves to the size limit configuration object.
143
147
*/
144
148
const 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
146
152
147
153
const sizeLimitConfig = (
148
154
await Promise . all ( allNodeEnvs . map ( getAllImportsWithNodeEnv ) )
You can’t perform that action at this time.
0 commit comments