/
githubmirror
/
webpack
Обзор
Документация
Войти
/
githubmirror
/
webpack
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
v5.108.1
lib/html/HtmlModule.js
40 строк
1 KB
Alexander Akait
refactor: type buildInfo and buildMeta per module type (#21172)
11 июн 2026, 17:00
Не верифицирован
11 июн 2026, 17:00
2a74860
Код
Авторство
О чём код?
/* MIT License http://www.opensource.org/licenses/mit-license.php */ "use strict"; const NormalModule = require("../NormalModule"); const makeSerializable = require("../util/makeSerializable"); /** @typedef {import("../NormalModule").NormalModuleBuildInfo} NormalModuleBuildInfo */ /** @typedef {import("../NormalModule").NormalModuleCreateData} NormalModuleCreateData */ /** @typedef {import("./HtmlModulesPlugin").EntryScriptInfo} EntryScriptInfo */ /** * Defines the build info properties specific to html modules. * @typedef {object} KnownHtmlModuleBuildInfo * @property {Record<string, EntryScriptInfo[]>=} htmlEntryScripts entries collected from the document, grouped by kind */ /** @typedef {NormalModuleBuildInfo & KnownHtmlModuleBuildInfo} HtmlModuleBuildInfo */ /** * Module class for `html` modules. HTML-specific properties should live here instead of `NormalModule`. */ class HtmlModule extends NormalModule { /** * @param {NormalModuleCreateData} options options object */ constructor(options) { super(options); // Redeclared with the html specific shape /** @type {HtmlModuleBuildInfo | undefined} */ this.buildInfo = undefined; } } makeSerializable(HtmlModule, "webpack/lib/html/HtmlModule"); module.exports = HtmlModule;