diff options
| author | Arpit Chakladar <54011232+arpitchakladar@users.noreply.github.com> | 2023-04-04 18:47:07 +0530 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-04-04 18:47:07 +0530 |
| commit | 6bc8d472a556774630e4432141d5ef9f8ea68c59 (patch) | |
| tree | ce84736dce9c14b06f1adbda867aa6a357a4bbab /config/webpack/utils | |
| parent | d178caee5c93ad9ed91dbd082b0f0b5a9b0507aa (diff) | |
| parent | 35413607c62f2de2a90941d487b7964b5c213999 (diff) | |
| download | banglar-bhumi-utils-6bc8d472a556774630e4432141d5ef9f8ea68c59.tar.gz banglar-bhumi-utils-6bc8d472a556774630e4432141d5ef9f8ea68c59.zip | |
Merge pull request #1 from arpitchakladar/shared-modules
Merging shared modules improvements.
Diffstat (limited to 'config/webpack/utils')
| -rw-r--r-- | config/webpack/utils/filename-hash.js (renamed from config/webpack/utils/file-name-hash.js) | 3 | ||||
| -rw-r--r-- | config/webpack/utils/shared-modules.js | 4 |
2 files changed, 2 insertions, 5 deletions
diff --git a/config/webpack/utils/file-name-hash.js b/config/webpack/utils/filename-hash.js index 889e9a4..bd66647 100644 --- a/config/webpack/utils/file-name-hash.js +++ b/config/webpack/utils/filename-hash.js @@ -1,10 +1,9 @@ const crypto = require("crypto"); module.exports.getFileNameHash = (fileName, prefix) => { - const finalFileName = `${prefix}-${fileName}`; const hash = crypto .createHash("md5") - .update(finalFileName) + .update(`${prefix}-${fileName}`) .digest("hex"); return production ? hash : `${fileName}-${hash.substring(16)}`; diff --git a/config/webpack/utils/shared-modules.js b/config/webpack/utils/shared-modules.js index 974145f..1584f0f 100644 --- a/config/webpack/utils/shared-modules.js +++ b/config/webpack/utils/shared-modules.js @@ -1,8 +1,6 @@ const path = require("path"); const fs = require("fs"); -const sharedModules = fs.readdirSync(path.resolve(SOURCE_DIR, "shared")) +module.exports = fs.readdirSync(path.resolve(SOURCE_DIR, "shared")) .filter(sharedModule => !sharedModule.endsWith("import-shared.js")) .map(sharedModule => sharedModule.substring(0, sharedModule.length - 3)); - -module.exports = sharedModules; |
