forked from mystiq/hydrogen-web
Do not add variables to root for runtime theme
This commit is contained in:
parent
8c02541b69
commit
bf87ed7eae
1 changed files with 2 additions and 1 deletions
|
@ -81,7 +81,8 @@ module.exports = (opts = {}) => {
|
||||||
const urlVariables = new Map();
|
const urlVariables = new Map();
|
||||||
const counter = createCounter();
|
const counter = createCounter();
|
||||||
root.walkDecls(decl => findAndReplaceUrl(decl, urlVariables, counter));
|
root.walkDecls(decl => findAndReplaceUrl(decl, urlVariables, counter));
|
||||||
if (urlVariables.size) {
|
const cssFileLocation = root.source.input.from;
|
||||||
|
if (urlVariables.size && !cssFileLocation.includes("type=runtime")) {
|
||||||
addResolvedVariablesToRootSelector(root, { Rule, Declaration }, urlVariables);
|
addResolvedVariablesToRootSelector(root, { Rule, Declaration }, urlVariables);
|
||||||
}
|
}
|
||||||
if (opts.compiledVariables){
|
if (opts.compiledVariables){
|
||||||
|
|
Loading…
Reference in a new issue