Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
finalIndexHTML,
variation.toString(),
variation === VARIATION_FALLBACK,
);
}
generateResult.files.forEach(file => {
compilation.assets[file.path] = {
source: () => file.content,
size: () => file.content.length,
};
});
} else {
/** If injection is disabled the user takes control, probably with it's own template. */
const serialized = serialize(localBaseIndex);
finalIndexHTML = minifyIndexHTML(serialized);
}
compilation.assets[filename] = {
source: () => finalIndexHTML,
size: () => finalIndexHTML.length,
};
};
*/
if (pluginConfig.inject) {
const result = createIndexHTML(inputIndexHTML, {
...pluginConfig,
entries,
legacyEntries,
});
return [{ path: pluginConfig.indexFilename, content: result.indexHTML }, ...result.files];
}
/**
* If injection is disabled the user takes control, probably with it's own template.
*/
const serialized = serialize(inputIndexHTML);
return [{ path: pluginConfig.indexFilename, content: minifyIndexHTML(serialized) }];
}