1
0
Fork 0
mirror of https://github.com/terribleplan/next.js.git synced 2024-01-19 02:48:18 +00:00

Make production compilation faster (patch) (#4677)

I have spend whole day on profiling next.js compiling performance and one of the easy hacks to reduce built time is avoid doing full `stats.toJson()` that is heavy by default.
This commit is contained in:
Steve Korshakov 2018-06-27 11:34:15 +03:00 committed by Tim Neutkens
parent 1ebd9967ac
commit 7fcfb8bde9

View file

@ -42,7 +42,7 @@ function runCompiler (compiler) {
webpackCompiler.run((err, stats) => {
if (err) return reject(err)
const jsonStats = stats.toJson()
const jsonStats = stats.toJson('errors-only')
if (jsonStats.errors.length > 0) {
const error = new Error(jsonStats.errors[0])