Skip to content
GitLab
Explore
Projects
Groups
Snippets
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Meta
create-react-app
Commits
f0719866
Unverified
Commit
f0719866
authored
7 years ago
by
Joe Haddad
Committed by
GitHub
7 years ago
Browse files
Options
Download
Email Patches
Plain Diff
Remove duplicated stack from `thread-loader` (#3847)
parent
ee2dd27e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
packages/react-dev-utils/formatWebpackMessages.js
+15
-0
packages/react-dev-utils/formatWebpackMessages.js
with
15 additions
and
0 deletions
+15
-0
packages/react-dev-utils/formatWebpackMessages.js
+
15
-
0
View file @
f0719866
...
@@ -40,6 +40,21 @@ function formatMessage(message, isError) {
...
@@ -40,6 +40,21 @@ function formatMessage(message, isError) {
lines
[
0
]
=
lines
[
0
].
substr
(
lines
[
0
].
lastIndexOf
(
'
!
'
)
+
1
);
lines
[
0
]
=
lines
[
0
].
substr
(
lines
[
0
].
lastIndexOf
(
'
!
'
)
+
1
);
}
}
// Remove unnecessary stack added by `thread-loader`
var
threadLoaderIndex
=
-
1
;
lines
.
forEach
(
function
(
line
,
index
)
{
if
(
threadLoaderIndex
!==
-
1
)
{
return
;
}
if
(
line
.
indexOf
(
'
from thread-loader (worker
'
)
!==
-
1
)
{
threadLoaderIndex
=
index
;
}
});
if
(
threadLoaderIndex
!==
-
1
)
{
lines
=
lines
.
slice
(
0
,
threadLoaderIndex
);
}
lines
=
lines
.
filter
(
function
(
line
)
{
lines
=
lines
.
filter
(
function
(
line
)
{
// Webpack adds a list of entry points to warning messages:
// Webpack adds a list of entry points to warning messages:
// @ ./src/index.js
// @ ./src/index.js
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment
Menu
Explore
Projects
Groups
Snippets