From 35413607c62f2de2a90941d487b7964b5c213999 Mon Sep 17 00:00:00 2001 From: Arpit Chakladar <54011232+arpitchakladar@users.noreply.github.com> Date: Tue, 4 Apr 2023 18:45:18 +0530 Subject: Arranging shared modules in the scripts in order to make sure that the dependencies are available when shared modules references each other. --- config/webpack/plugins/create-manifest-webpack-plugin/index.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'config/webpack/plugins') 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" -- cgit v1.2.3