diff options
| author | Arpit Chakladar <arpitchakladar@gmail.com> | 2026-09-29 17:48:06 +0530 |
|---|---|---|
| committer | Arpit Chakladar <arpitchakladar@gmail.com> | 2026-09-29 17:51:16 +0530 |
| commit | b200c1345392c055bfe48e1c06d6dfc2a0768565 (patch) | |
| tree | 2bdf56aacc9e6ac38adc5a4896c27668ca686340 /config/webpack/plugins/create-manifest-webpack-plugin | |
| parent | 9544e606c0f2a35124018a3c1099d987ba673ae6 (diff) | |
| download | banglar-bhumi-utils-b200c1345392c055bfe48e1c06d6dfc2a0768565.tar.gz banglar-bhumi-utils-b200c1345392c055bfe48e1c06d6dfc2a0768565.zip | |
ci(config): ignore rules directory if src/rules is empty
Diffstat (limited to 'config/webpack/plugins/create-manifest-webpack-plugin')
| -rw-r--r-- | config/webpack/plugins/create-manifest-webpack-plugin/index.js | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/config/webpack/plugins/create-manifest-webpack-plugin/index.js b/config/webpack/plugins/create-manifest-webpack-plugin/index.js index f2e28b2..e28c695 100644 --- a/config/webpack/plugins/create-manifest-webpack-plugin/index.js +++ b/config/webpack/plugins/create-manifest-webpack-plugin/index.js @@ -104,6 +104,12 @@ class CreateManifestPlugin { } } + // `CreateRulesPlugin` skips emitting `rules.json` when `src/rules/` + // holds no rule files, so drop the ruleset reference with it. + if (!("rules.json" in assets)) { + delete manifest.declarative_net_request; + } + const injectedSharedModules = this.sortedSharedModules .filter((sharedModule) => this.injectedSharedModulesImportedCount[sharedModule] > 0) .map((sharedModule) => `shared/${getFileName(sharedModule, "shared")}.js`); |
