diff --git a/packages/kbn-optimizer/src/common/bundle.test.ts b/packages/kbn-optimizer/src/common/bundle.test.ts index 59d730dd661be..58acd982bf383 100644 --- a/packages/kbn-optimizer/src/common/bundle.test.ts +++ b/packages/kbn-optimizer/src/common/bundle.test.ts @@ -59,7 +59,7 @@ it('creates cache keys', () => { }, "dllName": "manifest-name", "dllRefs": Object { - "./some-foo.ts": "1:ku/53aRMuAA+4TmQeCWA/w:GtuPW9agF2yecW0xAIHtUQ", + "./some-foo.ts": "1:8ZZnQFMG7xLG5lQakybjWCNbihQ:6Yk7GIWDT9j4uCAeHPI2xJcHgrE", }, "spec": Object { "banner": undefined, diff --git a/packages/kbn-optimizer/src/common/dll_manifest.ts b/packages/kbn-optimizer/src/common/dll_manifest.ts index 6192e6cd4135a..f4e86eb9ee948 100644 --- a/packages/kbn-optimizer/src/common/dll_manifest.ts +++ b/packages/kbn-optimizer/src/common/dll_manifest.ts @@ -19,7 +19,7 @@ export interface ParsedDllManifest { } const hash = (s: string) => { - return Crypto.createHash('md5').update(s).digest('base64').replace(/=+$/, ''); + return Crypto.createHash('sha1').update(s).digest('base64').replace(/=+$/, ''); }; export function parseDllManifest(manifest: DllManifest): ParsedDllManifest { diff --git a/packages/kbn-optimizer/src/worker/webpack.config.ts b/packages/kbn-optimizer/src/worker/webpack.config.ts index 646b3c42da1ac..f81d0e89fb983 100644 --- a/packages/kbn-optimizer/src/worker/webpack.config.ts +++ b/packages/kbn-optimizer/src/worker/webpack.config.ts @@ -50,6 +50,7 @@ export function getWebpackConfig( profile: worker.profileWebpack, output: { + hashFunction: 'sha1', path: bundle.outputDir, filename: `${bundle.id}.${bundle.type}.js`, chunkFilename: `${bundle.id}.chunk.[id].js`,