File tree 3 files changed +11
-13
lines changed
3 files changed +11
-13
lines changed Original file line number Diff line number Diff line change @@ -220,10 +220,10 @@ compiler.plugin('done', function(stats) {
220
220
});
221
221
```
222
222
223
- #### ` printBuildError(error: Object): String `
223
+ #### ` printBuildError(error: Object): void `
224
224
225
225
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.
227
227
228
228
```
229
229
const printBuildError = require('react-dev-utils/printBuildError')
Original file line number Diff line number Diff line change @@ -42,11 +42,9 @@ module.exports = function printBuildError(err) {
42
42
} catch ( ignored ) {
43
43
console . log ( 'Failed to minify the code.' , err ) ;
44
44
}
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' ) ;
49
46
} else {
50
47
console . log ( ( message || err ) + '\n' ) ;
51
48
}
49
+ console . log ( ) ;
52
50
} ;
Original file line number Diff line number Diff line change @@ -2001,13 +2001,13 @@ This will only work for locales that have been explicitly imported before.
2001
2001
2002
2002
### ` npm run build ` fails to minify
2003
2003
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 .
2011
2011
2012
2012
## Something Missing?
2013
2013
You can’t perform that action at this time.
0 commit comments