diff options
author | Robert Speicher <rspeicher@gmail.com> | 2021-01-20 13:34:23 -0600 |
---|---|---|
committer | Robert Speicher <rspeicher@gmail.com> | 2021-01-20 13:34:23 -0600 |
commit | 6438df3a1e0fb944485cebf07976160184697d72 (patch) | |
tree | 00b09bfd170e77ae9391b1a2f5a93ef6839f2597 /config/webpack.config.js | |
parent | 42bcd54d971da7ef2854b896a7b34f4ef8601067 (diff) | |
download | gitlab-ce-6438df3a1e0fb944485cebf07976160184697d72.tar.gz |
Add latest changes from gitlab-org/gitlab@13-8-stable-eev13.8.0-rc42
Diffstat (limited to 'config/webpack.config.js')
-rw-r--r-- | config/webpack.config.js | 18 |
1 files changed, 9 insertions, 9 deletions
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`); |