forked from mystiq/hydrogen-web
Don't use theme-name in manifest file names
This commit is contained in:
parent
623939c671
commit
e3372f0f2b
1 changed files with 3 additions and 1 deletions
|
@ -257,8 +257,10 @@ module.exports = function buildThemes(options) {
|
||||||
const derivedVariables = compiledVariables["derived-variables"];
|
const derivedVariables = compiledVariables["derived-variables"];
|
||||||
const icon = compiledVariables["icon"];
|
const icon = compiledVariables["icon"];
|
||||||
const builtAssets = {};
|
const builtAssets = {};
|
||||||
|
let themeKey;
|
||||||
for (const chunk of chunkArray) {
|
for (const chunk of chunkArray) {
|
||||||
const [, name, variant] = chunk.fileName.match(/theme-(.+)-(.+)\.css/);
|
const [, name, variant] = chunk.fileName.match(/theme-(.+)-(.+)\.css/);
|
||||||
|
themeKey = name;
|
||||||
builtAssets[`${name}-${variant}`] = assetMap.get(chunk.fileName).fileName;
|
builtAssets[`${name}-${variant}`] = assetMap.get(chunk.fileName).fileName;
|
||||||
}
|
}
|
||||||
manifest.source = {
|
manifest.source = {
|
||||||
|
@ -267,7 +269,7 @@ module.exports = function buildThemes(options) {
|
||||||
"derived-variables": derivedVariables,
|
"derived-variables": derivedVariables,
|
||||||
"icon": icon
|
"icon": icon
|
||||||
};
|
};
|
||||||
const name = `theme-${manifest.name}.json`;
|
const name = `theme-${themeKey}.json`;
|
||||||
manifestLocations.push(`assets/${name}`);
|
manifestLocations.push(`assets/${name}`);
|
||||||
this.emitFile({
|
this.emitFile({
|
||||||
type: "asset",
|
type: "asset",
|
||||||
|
|
Loading…
Reference in a new issue