From 49535807bf1b60c3e8d4dbabacd6108c80e98d04 Mon Sep 17 00:00:00 2001 From: RMidhunSuresh Date: Sun, 10 Apr 2022 14:59:08 +0530 Subject: [PATCH] Do not run plugin on runtime theme --- scripts/postcss/css-url-processor.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/scripts/postcss/css-url-processor.js b/scripts/postcss/css-url-processor.js index 1a0e4fdf..c050a898 100644 --- a/scripts/postcss/css-url-processor.js +++ b/scripts/postcss/css-url-processor.js @@ -68,6 +68,11 @@ module.exports = (opts = {}) => { postcssPlugin: "postcss-url-to-variable", Once(root, {result}) { + const cssFileLocation = root.source.input.from; + if (cssFileLocation.includes("type=runtime")) { + // If this is a runtime theme, don't process urls. + return; + } /* postcss-compile-variables should have sent the list of resolved colours down via results */