From f65a1da09353b605acbf349a2d3d024b4abef38c Mon Sep 17 00:00:00 2001 From: Mike Greiling Date: Tue, 1 May 2018 15:04:20 -0500 Subject: temporarily disable deterministic chunk hash logic --- config/webpack.config.js | 44 -------------------------------------------- 1 file changed, 44 deletions(-) (limited to 'config/webpack.config.js') 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([ { -- cgit v1.2.1