Skip to content

Commit 8f67581

Browse files
committed
improve readibility + shorten link
1 parent a0d089b commit 8f67581

File tree

3 files changed

+11
-13
lines changed

3 files changed

+11
-13
lines changed

Diff for: packages/react-dev-utils/README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -220,10 +220,10 @@ compiler.plugin('done', function(stats) {
220220
});
221221
```
222222

223-
#### `printBuildError(error: Object): String`
223+
#### `printBuildError(error: Object): void`
224224

225225
Prettify some known build errors.
226-
Pass an Error object to log a prettified error message in the console
226+
Pass an Error object to log a prettified error message in the console.
227227

228228
```
229229
const printBuildError = require('react-dev-utils/printBuildError')

Diff for: packages/react-dev-utils/printBuildError.js

+2-4
Original file line numberDiff line numberDiff line change
@@ -42,11 +42,9 @@ module.exports = function printBuildError(err) {
4242
} catch (ignored) {
4343
console.log('Failed to minify the code.', err);
4444
}
45-
console.log('Read more here:');
46-
console.log(
47-
'https://github.com/facebookincubator/create-react-app/blob/master/packages/react-scripts/template/README.md#npm-run-build-fails-to-minify\n'
48-
);
45+
console.log('Read more here: http://bit.ly/2tRViJ9');
4946
} else {
5047
console.log((message || err) + '\n');
5148
}
49+
console.log();
5250
};

Diff for: packages/react-scripts/template/README.md

+7-7
Original file line numberDiff line numberDiff line change
@@ -2001,13 +2001,13 @@ This will only work for locales that have been explicitly imported before.
20012001

20022002
### `npm run build` fails to minify
20032003

2004-
Some dependencies may be shipping their source which our minify can't process.
2005-
Because running Babel on `node_modules` is slow, we cannot compile it to es5
2006-
before minifying it. Possible solutions are:
2007-
1. Raise an issue with the library author to ship compiled es5.
2008-
2. If it's small and compatible with out babel preset, you can place the
2009-
source in ./src.
2010-
3. Fork the project repo and publish an es5 version of it.
2004+
You may occasionally find a package you depend on needs compiled or ships code for a non-browser environment.<br>
2005+
This is considered poor practice in the ecosystem and does not have an escape hatch in Create React App.<br>
2006+
<br>
2007+
To resolve this:
2008+
1. Open an issue on the dependency's issue tracker and ask that the package be published pre-compiled (retaining ES6 Modules).
2009+
2. Fork the package and publish a corrected version yourself.
2010+
3. If the dependency is small enough, copy it to your `src/` folder and treat it as application code.
20112011

20122012
## Something Missing?
20132013

0 commit comments

Comments
 (0)