in packages/build-plugin-lce/src/common/htmlInjection.js [123:144]
function configHTMLPlugin(config) {
const htmlParams = getHTMLParams(htmlContentStorage);
const htmlPluginOptions = {
inject: false,
};
const entry = config.entryPoints.entries();
// mpa HtmlWebpackPlugin
if (Object.prototype.toString.call(entry) === '[object Object]' && Object.keys(entry).length > 1) {
// delete multi HtmlWebpackPlugin
Object.keys(entry).forEach((entryKey) => {
const pluginName = `HtmlWebpackPlugin_${entryKey}`;
modifyHTMLPluginOptions(
config,
pluginName,
htmlPluginOptions,
multiHTMLContentStorage[entryKey] ? getHTMLParams(multiHTMLContentStorage[entryKey]) : htmlParams,
);
});
} else {
modifyHTMLPluginOptions(config, 'HtmlWebpackPlugin', htmlPluginOptions, htmlParams);
}
}