From d178caee5c93ad9ed91dbd082b0f0b5a9b0507aa Mon Sep 17 00:00:00 2001 From: Arpit Chakladar <54011232+arpitchakladar@users.noreply.github.com> Date: Mon, 27 Mar 2023 21:38:43 +0530 Subject: Refactoring code. Only using hashes for output file names. Using singleton pattern to store the callbacks for observeDOM, and only one MutationObserver. --- config/webpack/plugins/create-manifest-webpack-plugin/index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'config/webpack/plugins/create-manifest-webpack-plugin/index.js') diff --git a/config/webpack/plugins/create-manifest-webpack-plugin/index.js b/config/webpack/plugins/create-manifest-webpack-plugin/index.js index 4ab363f..785d604 100644 --- a/config/webpack/plugins/create-manifest-webpack-plugin/index.js +++ b/config/webpack/plugins/create-manifest-webpack-plugin/index.js @@ -29,7 +29,7 @@ class CreateManifestPlugin { manifest.content_scripts.push({ matches, - js: [`scripts/${getFileNameHash(scriptPath)}-${scriptType}.js`], + js: [`scripts/${getFileNameHash(scriptType, scriptPath)}.js`], run_at: getScriptRuntimeFromType(scriptType) }); } @@ -44,7 +44,7 @@ class CreateManifestPlugin { } for (const sharedModule of sharedModules) { - resources.push(`shared/${getFileNameHash(sharedModule)}.js`); + resources.push(`shared/${getFileNameHash(sharedModule, "shared")}.js`); } if (resources.length > 0) { -- cgit v1.2.3