Do not run plugin on runtime theme

This commit is contained in:
RMidhunSuresh 2022-04-10 14:59:08 +05:30
parent a6b6fef6d2
commit 49535807bf

View file

@ -68,6 +68,11 @@ module.exports = (opts = {}) => {
postcssPlugin: "postcss-url-to-variable", postcssPlugin: "postcss-url-to-variable",
Once(root, {result}) { 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 postcss-compile-variables should have sent the list of resolved colours down via results
*/ */