From f18102cdaf55acbf3bae7a7290c9158d21abc7eb Mon Sep 17 00:00:00 2001 From: Arpit Chakladar <54011232+arpitchakladar@users.noreply.github.com> Date: Thu, 9 Feb 2023 14:40:38 +0530 Subject: Using path hash for seperating scripts for different paths --- config/webpack/utils/file-name-hash.js | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 config/webpack/utils/file-name-hash.js (limited to 'config/webpack/utils') diff --git a/config/webpack/utils/file-name-hash.js b/config/webpack/utils/file-name-hash.js new file mode 100644 index 0000000..e3988a9 --- /dev/null +++ b/config/webpack/utils/file-name-hash.js @@ -0,0 +1,3 @@ +const crypto = require("crypto"); + +module.exports.getFileNameHash = fileName => crypto.createHash("md5").update(fileName).digest("hex").substring(16); -- cgit v1.2.3