aboutsummaryrefslogtreecommitdiffstats
path: root/config/webpack/plugins/create-manifest-webpack-plugin/index.js
diff options
context:
space:
mode:
authorArpit Chakladar <54011232+arpitchakladar@users.noreply.github.com>2023-04-04 18:45:18 +0530
committerArpit Chakladar <54011232+arpitchakladar@users.noreply.github.com>2023-04-04 18:45:18 +0530
commit35413607c62f2de2a90941d487b7964b5c213999 (patch)
treece84736dce9c14b06f1adbda867aa6a357a4bbab /config/webpack/plugins/create-manifest-webpack-plugin/index.js
parent7455c1e81dd18a898004c398a16e9f0b6f7c19ae (diff)
downloadbanglar-bhumi-utils-35413607c62f2de2a90941d487b7964b5c213999.tar.gz
banglar-bhumi-utils-35413607c62f2de2a90941d487b7964b5c213999.zip
Arranging shared modules in the scripts in order to make sure that the dependencies are available when shared modules references each other.
Diffstat (limited to 'config/webpack/plugins/create-manifest-webpack-plugin/index.js')
-rw-r--r--config/webpack/plugins/create-manifest-webpack-plugin/index.js6
1 files changed, 3 insertions, 3 deletions
diff --git a/config/webpack/plugins/create-manifest-webpack-plugin/index.js b/config/webpack/plugins/create-manifest-webpack-plugin/index.js
index 103fb3c..b4a29a3 100644
--- a/config/webpack/plugins/create-manifest-webpack-plugin/index.js
+++ b/config/webpack/plugins/create-manifest-webpack-plugin/index.js
@@ -4,12 +4,12 @@ const path = require("path");
const { getScriptRuntimeFromType } = webpackRequire("utils/script-runtime");
const { getFileNameHash } = webpackRequire("utils/filename-hash");
const scripts = webpackRequire("utils/scripts");
-const sharedModules = webpackRequire("utils/shared-modules");
const manifest = webpackRequire("plugins/create-manifest-webpack-plugin/manifest-template.json");
class CreateManifestPlugin {
- constructor({ sharedModulesImportedCount }) {
+ constructor({ sharedModulesImportedCount, sortedSharedModules }) {
this.sharedModulesImportedCount = sharedModulesImportedCount;
+ this.sortedSharedModules = sortedSharedModules;
}
apply(compiler) {
@@ -26,7 +26,7 @@ class CreateManifestPlugin {
manifest.content_scripts.push({
matches: [`*://banglarbhumi.gov.in/BanglarBhumi/*`],
- js: sharedModules
+ js: this.sortedSharedModules
.filter(sharedModule => this.sharedModulesImportedCount[sharedModule] > 0)
.map(sharedModule => `shared/${getFileNameHash(sharedModule, "shared")}.js`),
run_at: "document_start"