From 600c337b1cdc884aebf59083eb57b178b43441ce Mon Sep 17 00:00:00 2001 From: Arpit Chakladar Date: Mon, 13 Jul 2026 11:35:08 +0530 Subject: docs: added some documentation comments to all functions --- config/webpack/loader/count-imports-loader.js | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'config/webpack/loader/count-imports-loader.js') diff --git a/config/webpack/loader/count-imports-loader.js b/config/webpack/loader/count-imports-loader.js index 2586332..3342921 100644 --- a/config/webpack/loader/count-imports-loader.js +++ b/config/webpack/loader/count-imports-loader.js @@ -1,6 +1,14 @@ import { ImportManager } from "import-manager"; import sharedModules from "../utils/shared-modules.js"; +/** + * Webpack loader that counts how many times each shared module is imported. + * This count is used later to determine which shared modules need to be + * included in the compiled output. + * + * @param {string} source - The source code of the current module. + * @returns {string} The unmodified source (this loader is side-effect only). + */ export default function(source) { const { sharedModulesImportedCount } = this.getOptions(); const manager = new ImportManager(source); -- cgit v1.2.3