forked from mystiq/hydrogen-web
built-asset must be a mapping
A mapping from theme-name to location of css file
This commit is contained in:
parent
5204fe5c99
commit
e8a4ab5ecc
1 changed files with 6 additions and 1 deletions
|
@ -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
|
||||||
|
|
Loading…
Reference in a new issue