mirror of
https://github.com/vector-im/hydrogen-web.git
synced 2024-12-23 03:25:12 +01:00
Add derived variables to source section
This commit is contained in:
parent
d5b5e10230
commit
b0f082e81f
@ -153,9 +153,11 @@ module.exports = function buildThemes(options) {
|
|||||||
const { assetMap, chunkMap, runtimeThemeChunk } = parseBundle(bundle);
|
const { assetMap, chunkMap, runtimeThemeChunk } = parseBundle(bundle);
|
||||||
for (const [location, chunkArray] of chunkMap) {
|
for (const [location, chunkArray] of chunkMap) {
|
||||||
const manifest = require(`${location}/manifest.json`);
|
const manifest = require(`${location}/manifest.json`);
|
||||||
|
const derivedVariables = options.compiledVariables.get(location)["derived-variables"];
|
||||||
manifest.source = {
|
manifest.source = {
|
||||||
"built-asset": chunkArray.map(chunk => assetMap.get(chunk.fileName).fileName),
|
"built-asset": chunkArray.map(chunk => assetMap.get(chunk.fileName).fileName),
|
||||||
"runtime-asset": assetMap.get(runtimeThemeChunk.fileName).fileName,
|
"runtime-asset": assetMap.get(runtimeThemeChunk.fileName).fileName,
|
||||||
|
"derived-variables": derivedVariables,
|
||||||
};
|
};
|
||||||
const name = `theme-${manifest.name}.json`;
|
const name = `theme-${manifest.name}.json`;
|
||||||
this.emitFile({
|
this.emitFile({
|
||||||
|
Loading…
Reference in New Issue
Block a user