summaryrefslogtreecommitdiff
path: root/config/webpack.config.js
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2019-12-04 15:11:23 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2019-12-04 15:11:23 +0000
commit8d3aee3636da5181ae94d23b47c6794b5610ab01 (patch)
tree73236b3e4b5d103c926df08449b2071ec19e4d18 /config/webpack.config.js
parent98420be3dddf5a093c39d96a8ca109aa21d0eaf8 (diff)
downloadgitlab-ce-8d3aee3636da5181ae94d23b47c6794b5610ab01.tar.gz
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'config/webpack.config.js')
-rw-r--r--config/webpack.config.js17
1 files changed, 17 insertions, 0 deletions
diff --git a/config/webpack.config.js b/config/webpack.config.js
index f69a799ebcf..3a43f515a1b 100644
--- a/config/webpack.config.js
+++ b/config/webpack.config.js
@@ -1,5 +1,6 @@
const path = require('path');
const glob = require('glob');
+const fs = require('fs');
const webpack = require('webpack');
const VueLoaderPlugin = require('vue-loader/lib/plugin');
const StatsWriterPlugin = require('webpack-stats-plugin').StatsWriterPlugin;
@@ -23,6 +24,7 @@ const NO_SOURCEMAPS = process.env.NO_SOURCEMAPS;
const VUE_VERSION = require('vue/package.json').version;
const VUE_LOADER_VERSION = require('vue-loader/package.json').version;
+const WEBPACK_VERSION = require('webpack/package.json').version;
const devtool = IS_PRODUCTION ? 'source-map' : 'cheap-module-eval-source-map';
@@ -359,6 +361,21 @@ module.exports = {
console.log(`Webpack heap size: ${toMB(memoryUsage)} MB`);
+ const webpackStatistics = {
+ memoryUsage,
+ date: Date.now(), // milliseconds
+ commitSHA: process.env.CI_COMMIT_SHA,
+ nodeVersion: process.versions.node,
+ webpackVersion: WEBPACK_VERSION,
+ };
+
+ console.log(webpackStatistics);
+
+ fs.writeFileSync(
+ path.join(ROOT_PATH, 'webpack-dev-server.json'),
+ JSON.stringify(webpackStatistics),
+ );
+
// exit in case we're running webpack-dev-server
IS_DEV_SERVER && process.exit();
});