From b0f082e81f555c8ba2faeefb565eb6098ea261a6 Mon Sep 17 00:00:00 2001 From: RMidhunSuresh Date: Fri, 1 Apr 2022 20:27:33 +0530 Subject: [PATCH] Add derived variables to source section --- scripts/build-plugins/rollup-plugin-build-themes.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/scripts/build-plugins/rollup-plugin-build-themes.js b/scripts/build-plugins/rollup-plugin-build-themes.js index cd4dc495..b5768e8c 100644 --- a/scripts/build-plugins/rollup-plugin-build-themes.js +++ b/scripts/build-plugins/rollup-plugin-build-themes.js @@ -153,9 +153,11 @@ module.exports = function buildThemes(options) { const { assetMap, chunkMap, runtimeThemeChunk } = parseBundle(bundle); for (const [location, chunkArray] of chunkMap) { const manifest = require(`${location}/manifest.json`); + const derivedVariables = options.compiledVariables.get(location)["derived-variables"]; manifest.source = { "built-asset": chunkArray.map(chunk => assetMap.get(chunk.fileName).fileName), "runtime-asset": assetMap.get(runtimeThemeChunk.fileName).fileName, + "derived-variables": derivedVariables, }; const name = `theme-${manifest.name}.json`; this.emitFile({