From 6438df3a1e0fb944485cebf07976160184697d72 Mon Sep 17 00:00:00 2001 From: Robert Speicher Date: Wed, 20 Jan 2021 13:34:23 -0600 Subject: Add latest changes from gitlab-org/gitlab@13-8-stable-ee --- config/webpack.config.js | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'config/webpack.config.js') diff --git a/config/webpack.config.js b/config/webpack.config.js index 42e27ea1668..958b27d674d 100644 --- a/config/webpack.config.js +++ b/config/webpack.config.js @@ -63,13 +63,13 @@ function generateEntries() { autoEntriesMap[chunkName] = `${prefix}/${path}`; } - pageEntries.forEach(path => generateAutoEntries(path)); + pageEntries.forEach((path) => generateAutoEntries(path)); if (IS_EE) { const eePageEntries = glob.sync('pages/**/index.js', { cwd: path.join(ROOT_PATH, 'ee/app/assets/javascripts'), }); - eePageEntries.forEach(path => generateAutoEntries(path, 'ee')); + eePageEntries.forEach((path) => generateAutoEntries(path, 'ee')); watchAutoEntries.push(path.join(ROOT_PATH, 'ee/app/assets/javascripts/pages/')); } @@ -77,7 +77,7 @@ function generateEntries() { autoEntriesCount = autoEntryKeys.length; // import ancestor entrypoints within their children - autoEntryKeys.forEach(entry => { + autoEntryKeys.forEach((entry) => { const entryPaths = [autoEntriesMap[entry]]; const segments = entry.split('.'); while (segments.pop()) { @@ -188,7 +188,7 @@ module.exports = { }, { test: /\.js$/, - exclude: path => + exclude: (path) => /node_modules\/(?!tributejs)|node_modules|vendor[\\/]assets/.test(path) && !/\.vue\.js/.test(path), loader: 'babel-loader', @@ -344,7 +344,7 @@ module.exports = { // webpack-rails only needs assetsByChunkName to function properly new StatsWriterPlugin({ filename: 'manifest.json', - transform: function(data, opts) { + transform: function (data, opts) { const stats = opts.compiler.getStats().toJson({ chunkModules: false, source: false, @@ -448,7 +448,7 @@ module.exports = { ]), !IS_EE && - new webpack.NormalModuleReplacementPlugin(/^ee_component\/(.*)\.vue/, resource => { + new webpack.NormalModuleReplacementPlugin(/^ee_component\/(.*)\.vue/, (resource) => { resource.request = path.join( ROOT_PATH, 'app/assets/javascripts/vue_shared/components/empty_component.js', @@ -485,14 +485,14 @@ module.exports = { const missingDeps = Array.from(compilation.missingDependencies); const nodeModulesPath = path.join(ROOT_PATH, 'node_modules'); const hasMissingNodeModules = missingDeps.some( - file => file.indexOf(nodeModulesPath) !== -1, + (file) => file.indexOf(nodeModulesPath) !== -1, ); // watch for changes to missing node_modules if (hasMissingNodeModules) compilation.contextDependencies.add(nodeModulesPath); // watch for changes to automatic entrypoints - watchAutoEntries.forEach(watchPath => compilation.contextDependencies.add(watchPath)); + watchAutoEntries.forEach((watchPath) => compilation.contextDependencies.add(watchPath)); // report our auto-generated bundle count console.log( @@ -518,7 +518,7 @@ module.exports = { ); } const memoryUsage = process.memoryUsage().heapUsed; - const toMB = bytes => Math.floor(bytes / 1024 / 1024); + const toMB = (bytes) => Math.floor(bytes / 1024 / 1024); console.log(`Webpack heap size: ${toMB(memoryUsage)} MB`); -- cgit v1.2.3