Skip to content

Commit

Permalink
fix: undefined colors error (#6)
Browse files Browse the repository at this point in the history
  • Loading branch information
nolanlawson authored and lukeed committed Dec 2, 2018
1 parent 5db7fdd commit 3841b0f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* see: https://github.com/facebookincubator/create-react-app/tree/master/packages/react-dev-utils
*/

const { inverse } = require('kleur');
const colors = require('kleur');

const errorLabel = 'Syntax error:';
const isLikelyASyntaxError = str => str.includes(errorLabel);
Expand Down Expand Up @@ -53,7 +53,7 @@ function formatMessage(message, isError) {
lines[1] = lines[1].replace(exportRegex, "$1 '$4' does not contain an export named '$3'.");
}

lines[0] = inverse(lines[0]);
lines[0] = colors.inverse(lines[0]);

// Reassemble & Strip internal tracing, except `webpack:` -- (create-react-app/pull/1050)
return lines.join('\n').replace(stackRegex, '').trim();
Expand Down

0 comments on commit 3841b0f

Please sign in to comment.