diff options
| author | Arpit Chakladar <54011232+arpitchakladar@users.noreply.github.com> | 2023-02-09 14:40:38 +0530 |
|---|---|---|
| committer | Arpit Chakladar <54011232+arpitchakladar@users.noreply.github.com> | 2023-02-09 14:40:38 +0530 |
| commit | f18102cdaf55acbf3bae7a7290c9158d21abc7eb (patch) | |
| tree | ab449b69e8b5684570c108a9dccbad78c51971c7 /config/webpack/plugins | |
| parent | b6046c22deb4d00ca07a9eedd27c7e8eae064518 (diff) | |
| download | banglar-bhumi-utils-f18102cdaf55acbf3bae7a7290c9158d21abc7eb.tar.gz banglar-bhumi-utils-f18102cdaf55acbf3bae7a7290c9158d21abc7eb.zip | |
Using path hash for seperating scripts for different paths
Diffstat (limited to 'config/webpack/plugins')
| -rw-r--r-- | config/webpack/plugins/create-manifest-webpack-plugin/index.js | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/config/webpack/plugins/create-manifest-webpack-plugin/index.js b/config/webpack/plugins/create-manifest-webpack-plugin/index.js index 5729ed9..fcfe689 100644 --- a/config/webpack/plugins/create-manifest-webpack-plugin/index.js +++ b/config/webpack/plugins/create-manifest-webpack-plugin/index.js @@ -3,6 +3,7 @@ const path = require("path"); const { version } = require(path.resolve(process.env.ROOT_DIR, "package.json")); const { getScriptRuntimeFromType } = require(path.resolve(process.env.CONFIG_DIR, "webpack/utils/script-runtime")); +const { getFileNameHash } = require(path.resolve(process.env.CONFIG_DIR, "webpack/utils/file-name-hash")); class CreateManifestPlugin { constructor({ scripts }) { @@ -42,7 +43,7 @@ class CreateManifestPlugin { for (const scriptPath in paths) { this.manifest.content_scripts.push({ matches: [`*://banglarbhumi.gov.in/${scriptPath}`], - js: [`scripts/${scriptRuntime}.js`], + js: [`scripts/${getFileNameHash(scriptPath)}/${scriptRuntime}.js`], run_at: scriptRuntime }); } |
