Skip to content

Commit 98a875a

Browse files
committed
Fix unfound export error
1 parent 74e4527 commit 98a875a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

packages/react-dev-utils/formatWebpackMessages.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -125,11 +125,11 @@ function formatMessage(message, isError) {
125125

126126
// Clean up export errors.
127127
// TODO: we should really send a PR to Webpack for this.
128-
var exportError = /\s*(.+?)\s*(")?export '(.+?)' was not found in '(.+?)'/;
128+
var exportError = /\s*(.*?)\s*(?:")?export '(.+?)' was not found in '(.+?)'/;
129129
if (lines[1].match(exportError)) {
130130
lines[1] = lines[1].replace(
131131
exportError,
132-
"$1 '$4' does not contain an export named '$3'."
132+
"$1 '$3' does not contain an export named '$2'."
133133
);
134134
}
135135

0 commit comments

Comments
 (0)