diff options
| author | Arpit Chakladar <arpitchakladar+git@gmail.com> | 2026-07-13 11:35:08 +0530 |
|---|---|---|
| committer | Arpit Chakladar <arpitchakladar+git@gmail.com> | 2026-07-13 11:35:08 +0530 |
| commit | 600c337b1cdc884aebf59083eb57b178b43441ce (patch) | |
| tree | d1f3cb7eb1020bcdcd66d9dbf0279f79d5856332 /config/webpack/plugins/create-manifest-webpack-plugin | |
| parent | 98e7019c61ea0ffe344ef7ce809d38d62254a9fc (diff) | |
| download | banglar-bhumi-utils-600c337b1cdc884aebf59083eb57b178b43441ce.tar.gz banglar-bhumi-utils-600c337b1cdc884aebf59083eb57b178b43441ce.zip | |
docs: added some documentation comments to all functions
Diffstat (limited to 'config/webpack/plugins/create-manifest-webpack-plugin')
| -rw-r--r-- | config/webpack/plugins/create-manifest-webpack-plugin/index.js | 19 |
1 files changed, 19 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 6f1e2be..f012f1e 100644 --- a/config/webpack/plugins/create-manifest-webpack-plugin/index.js +++ b/config/webpack/plugins/create-manifest-webpack-plugin/index.js @@ -11,13 +11,32 @@ const manifest = JSON.parse( ), ); +/** + * Webpack plugin that dynamically generates the extension's + * `manifest.json` asset. It reads the template, resolves the + * current version from `package.json`, and builds `content_scripts` + * entries by matching script definitions from `scripts.json` against + * page URL patterns. Shared modules, injected scripts, and + * web-accessible resources are added automatically based on import + * counts collected during the build. + */ class CreateManifestPlugin { + /** + * @param {{ + * sharedModulesImportedCount: Record<string, number>, + * injectedSharedModulesImportedCount: Record<string, number>, + * sortedSharedModules: string[] + * }} options + */ constructor({ sharedModulesImportedCount, injectedSharedModulesImportedCount, sortedSharedModules }) { this.sharedModulesImportedCount = sharedModulesImportedCount; this.injectedSharedModulesImportedCount = injectedSharedModulesImportedCount; this.sortedSharedModules = sortedSharedModules; } + /** + * @param {import("webpack").Compiler} compiler + */ apply(compiler) { compiler.hooks.compilation.tap("CreateManifestPlugin", compilation => { compilation.hooks.processAssets.tap( |
