built-asset must be a mapping

A mapping from theme-name to location of css file
This commit is contained in:
RMidhunSuresh 2022-05-10 16:58:06 +05:30
parent 5204fe5c99
commit e8a4ab5ecc

View file

@ -253,8 +253,13 @@ module.exports = function buildThemes(options) {
const compiledVariables = options.compiledVariables.get(location); const compiledVariables = options.compiledVariables.get(location);
const derivedVariables = compiledVariables["derived-variables"]; const derivedVariables = compiledVariables["derived-variables"];
const icon = compiledVariables["icon"]; const icon = compiledVariables["icon"];
const builtAsset = {};
for (const chunk of chunkArray) {
const [, name, variant] = chunk.fileName.match(/theme-(.+)-(.+)\.css/);
builtAsset[`${name}-${variant}`] = assetMap.get(chunk.fileName).fileName;
}
manifest.source = { manifest.source = {
"built-asset": chunkArray.map(chunk => assetMap.get(chunk.fileName).fileName), "built-asset": builtAsset,
"runtime-asset": assetMap.get(runtimeThemeChunk.fileName).fileName, "runtime-asset": assetMap.get(runtimeThemeChunk.fileName).fileName,
"derived-variables": derivedVariables, "derived-variables": derivedVariables,
"icon": icon "icon": icon