File tree 1 file changed +10
-6
lines changed
1 file changed +10
-6
lines changed Original file line number Diff line number Diff line change @@ -56,14 +56,18 @@ function assertSingleDefaultExport(
56
56
)
57
57
}
58
58
} else if ( ! FILES_WITH_SIDE_EXPORTS . some ( ( ext ) => filePath . endsWith ( ext ) ) ) {
59
- const exportsInvalidStr = exportsInvalid . join ( ', ' )
60
59
if ( defaultExportValueIsUnknown ) {
61
- assertWarning (
62
- exportsInvalid . length === 0 ,
63
- `${ filePath } should only have a default export: remove ${ pc . cyan ( `export { ${ exportsInvalidStr } }` ) } ` ,
64
- { onlyOnce : true }
65
- )
60
+ exportsInvalid . forEach ( ( exportInvalid ) => {
61
+ assertWarning (
62
+ exportsInvalid . length === 0 ,
63
+ `${ filePath } should only have a default export: move ${ pc . cyan (
64
+ `export { ${ exportInvalid } }`
65
+ ) } to +config.h.js or its own +${ exportsInvalid } .js`,
66
+ { onlyOnce : true }
67
+ )
68
+ } )
66
69
} else {
70
+ const exportsInvalidStr = exportsInvalid . join ( ', ' )
67
71
assertWarning (
68
72
exportsInvalid . length === 0 ,
69
73
`${ filePath } replace ${ pc . cyan ( `export { ${ exportsInvalidStr } }` ) } with ${ pc . cyan (
You can’t perform that action at this time.
0 commit comments