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:
parent
1ebd9967ac
commit
7fcfb8bde9
|
@ -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])
|
||||
|
|
Loading…
Reference in a new issue