diff options
author | Mike Greiling <mike@pixelcog.com> | 2018-05-01 15:04:20 -0500 |
---|---|---|
committer | Mike Greiling <mike@pixelcog.com> | 2018-05-01 15:15:10 -0500 |
commit | f65a1da09353b605acbf349a2d3d024b4abef38c (patch) | |
tree | 698e373c2f89df5f3ca34f1bac4beefe57174329 /config/webpack.config.js | |
parent | 50889179df671a29175ea69b9187a2eb67e652f0 (diff) | |
download | gitlab-ce-f65a1da09353b605acbf349a2d3d024b4abef38c.tar.gz |
temporarily disable deterministic chunk hash logic
Diffstat (limited to 'config/webpack.config.js')
-rw-r--r-- | config/webpack.config.js | 44 |
1 files changed, 0 insertions, 44 deletions
diff --git a/config/webpack.config.js b/config/webpack.config.js index 577f1656e3b..4907b328b5a 100644 --- a/config/webpack.config.js +++ b/config/webpack.config.js @@ -1,4 +1,3 @@ -const crypto = require('crypto'); const fs = require('fs'); const path = require('path'); const glob = require('glob'); @@ -193,49 +192,6 @@ const config = { jQuery: 'jquery', }), - // assign deterministic module ids - new webpack.NamedModulesPlugin(), - new NameAllModulesPlugin(), - - // assign deterministic chunk ids - new webpack.NamedChunksPlugin(chunk => { - if (chunk.name) { - return chunk.name; - } - - const moduleNames = []; - - function collectModuleNames(m) { - // handle ConcatenatedModule which does not have resource nor context set - if (m.modules) { - m.modules.forEach(collectModuleNames); - return; - } - - const pagesBase = path.join(ROOT_PATH, 'app/assets/javascripts/pages'); - - if (m.resource.indexOf(pagesBase) === 0) { - moduleNames.push( - path - .relative(pagesBase, m.resource) - .replace(/\/index\.[a-z]+$/, '') - .replace(/\//g, '__') - ); - } else { - moduleNames.push(path.relative(m.context, m.resource)); - } - } - - chunk.forEachModule(collectModuleNames); - - const hash = crypto - .createHash('sha256') - .update(moduleNames.join('_')) - .digest('hex'); - - return `${moduleNames[0]}-${hash.substr(0, 6)}`; - }), - // copy pre-compiled vendor libraries verbatim new CopyWebpackPlugin([ { |