Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
css.walkRules(function(rule) {
if(rule.selector === ":export") {
rule.walkDecls(function(decl) {
exports[decl.prop] = decl.value;
});
rule.remove();
} else if(/^:import\(.+\)$/.test(rule.selector)) {
var match = /^:import\((.+)\)$/.exec(rule.selector);
var url = loaderUtils.parseString(match[1]);
rule.walkDecls(function(decl) {
imports["$" + decl.prop] = importItems.length;
importItems.push({
url: url,
export: decl.value
});
});
rule.remove();
}
});
css.walkRules(function(rule) {
if(rule.selector === ":export") {
rule.walkDecls(function(decl) {
exports[decl.prop] = decl.value;
});
rule.remove();
} else if(/^:import\(.+\)$/.test(rule.selector)) {
var match = /^:import\((.+)\)$/.exec(rule.selector);
var url = loaderUtils.parseString(match[1]);
rule.walkDecls(function(decl) {
imports["$" + decl.prop] = importItems.length;
importItems.push({
url: url,
export: decl.value
});
});
rule.remove();
}
});
css.eachRule(function(rule) {
if(rule.selector === ":export") {
rule.eachDecl(function(decl) {
exports[decl.prop] = decl.value;
});
rule.removeSelf();
} else if(/^:import\(.+\)$/.test(rule.selector)) {
var match = /^:import\((.+)\)$/.exec(rule.selector);
var url = loaderUtils.parseString(match[1]);
rule.eachDecl(function(decl) {
imports["$" + decl.prop] = importItems.length;
importItems.push({
url: url,
export: decl.value
});
});
rule.removeSelf();
}
});
Object.keys(icss.icssImports).forEach(function(key) {
var url = loaderUtils.parseString(key);
Object.keys(icss.icssImports[key]).forEach(function(prop) {
imports["$" + prop] = importItems.length;
importItems.push({
url: url,
export: icss.icssImports[key][prop]
});
})
});
Object.keys(icss.icssImports).forEach(function(key) {
var url = loaderUtils.parseString(key);
Object.keys(icss.icssImports[key]).forEach(function(prop) {
imports["$" + prop] = importItems.length;
importItems.push({
url: url,
export: icss.icssImports[key][prop]
});
})
});
Object.keys(icss.icssImports).forEach(function(key) {
var url = loaderUtils.parseString(key);
Object.keys(icss.icssImports[key]).forEach(function(prop) {
imports["$" + prop] = importItems.length;
importItems.push({
url: url,
export: icss.icssImports[key][prop]
});
})
});
Object.keys(icss.icssImports).forEach(function (key) {
var url = loaderUtils.parseString(key)
Object.keys(icss.icssImports[key]).forEach(function (prop) {
imports['$' + prop] = importItems.length
importItems.push({
url: url,
export: icss.icssImports[key][prop]
})
})
})
Object.keys(icss.icssImports).forEach(function(key) {
var url = loaderUtils.parseString(key);
Object.keys(icss.icssImports[key]).forEach(function(prop) {
imports["$" + prop] = importItems.length;
importItems.push({
url: url,
export: icss.icssImports[key][prop]
});
})
});
Object.keys(icss.icssImports).forEach(function(key) {
var url = loaderUtils.parseString(key);
Object.keys(icss.icssImports[key]).forEach(function(prop) {
imports["$" + prop] = importItems.length;
importItems.push({
url: url,
export: icss.icssImports[key][prop]
});
})
});
Object.keys(icss.icssImports).forEach(function(key) {
var url = loaderUtils.parseString(key);
Object.keys(icss.icssImports[key]).forEach(function(prop) {
imports["$" + prop] = importItems.length;
importItems.push({
url: url,
export: icss.icssImports[key][prop]
});
})
});