From fa915aacc3a8579b3224ac62fdda43be5f16e403 Mon Sep 17 00:00:00 2001 From: Lyrkan Date: Wed, 13 Feb 2019 19:02:28 +0100 Subject: [PATCH] Add an enableIntegrityHashes() method to the public API --- index.js | 34 +++++++++ lib/WebpackConfig.js | 21 ++++++ lib/plugins/entry-files-manifest.js | 85 +++++++++++++++------ test/WebpackConfig.js | 38 ++++++++++ test/functional.js | 110 ++++++++++++++++++++++++++++ test/index.js | 9 +++ 6 files changed, 274 insertions(+), 23 deletions(-) diff --git a/index.js b/index.js index ee527b0c..b4dcdea0 100644 --- a/index.js +++ b/index.js @@ -1144,6 +1144,40 @@ class Encore { return this; } + /** + * If enabled, add integrity hashes to the entrypoints.json + * file for all the files it references. + * + * These hashes can then be used, for instance, in the "integrity" + * attributes of