From bade3a4c9f166ffc379ffd4a0fdab32ef3aafab9 Mon Sep 17 00:00:00 2001 From: "Michael Bradley, Jr" Date: Fri, 20 Jul 2018 16:50:47 -0500 Subject: [PATCH] disable stats gen (should be activated via cfg file and/or cli opts) --- lib/pipeline/webpackProcess.js | 49 +++++++++++++++++----------------- 1 file changed, 25 insertions(+), 24 deletions(-) diff --git a/lib/pipeline/webpackProcess.js b/lib/pipeline/webpackProcess.js index d7768430..7ad409cf 100644 --- a/lib/pipeline/webpackProcess.js +++ b/lib/pipeline/webpackProcess.js @@ -51,8 +51,9 @@ class WebpackProcess extends ProcessWrapper { filename: filename, umdNamedDefine: true }, - profile: true, - stats: 'verbose', + // profile: true, + // stats: 'verbose', + // note: generating and writing to disk verbose stats increases build time resolve: { alias: importsList, modules: [ @@ -63,7 +64,7 @@ class WebpackProcess extends ProcessWrapper { plugins: [ new HardSourceWebpackPlugin({ cacheDirectory: fs.dappPath('node_modules/.cache/hard-source'), - // ufglify would still save its cache in embark's node_modules/.cache/ + // ufglify (wp mode: production) will still save its cache in embark's node_modules/.cache/ environmentHash: { root: fs.dappPath() } @@ -147,27 +148,27 @@ class WebpackProcess extends ProcessWrapper { ); } next(); - }, - function writeStatsReport(next) { - if (detectErrors) { - self._log('info', 'writing file '+ ('.embark/stats.report').bold.dim); - } - fs.writeFile( - path.join(fs.dappPath('.embark'), 'stats.report'), - stats.toString(webpackOptions.stats), - next - ); - }, - function writeStatsJSON(next) { - if (detectErrors) { - self._log('info','writing file '+ ('.embark/stats.json').bold.dim); - } - fs.writeFile( - path.join(fs.dappPath('.embark'), 'stats.json'), - JSON.stringify(stats.toJson(webpackOptions.stats)), - next - ); - } + }//, + // function writeStatsReport(next) { + // if (detectErrors) { + // self._log('info', 'writing file '+ ('.embark/stats.report').bold.dim); + // } + // fs.writeFile( + // path.join(fs.dappPath('.embark'), 'stats.report'), + // stats.toString(webpackOptions.stats), + // next + // ); + // }, + // function writeStatsJSON(next) { + // if (detectErrors) { + // self._log('info','writing file '+ ('.embark/stats.json').bold.dim); + // } + // fs.writeFile( + // path.join(fs.dappPath('.embark'), 'stats.json'), + // JSON.stringify(stats.toJson(webpackOptions.stats)), + // next + // ); + // } ], (err) => { callback(err); });