How to use the loader-utils.parseString function in loader-utils

To help you get started, we’ve selected a few loader-utils examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github MyGitHubFork / WebBasicCommonDemos / WebPack学习 / WebPack经典案列 / node_modules / css-loader / lib / processCss.js View on Github external
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();
			}
		});
github willurmston / Tone.Editor / node_modules / css-loader / lib / processCss.js View on Github external
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();
			}
		});
github elastic / timelion / node_modules / css-loader / lib / processCss.js View on Github external
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();
			}
		});
github zubairghori / Ultimate_todo_list / node_modules / css-loader / lib / processCss.js View on Github external
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]
				});
			})
		});
github sx1989827 / DOClever / node_modules / css-loader / lib / processCss.js View on Github external
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]
				});
			})
		});
github xxxgitone / learningProcess / WebPack-Beginner / node_modules / css-loader / lib / processCss.js View on Github external
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]
				});
			})
		});
github didi / mpx / packages / webpack-plugin / lib / wxss / processCss.js View on Github external
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]
        })
      })
    })
github sx1989827 / DOClever / Client / node_modules / css-loader / lib / processCss.js View on Github external
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]
				});
			})
		});
github sx1989827 / DOClever / Desktop / node_modules / css-loader / lib / processCss.js View on Github external
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]
				});
			})
		});
github fossasia / susper.com / node_modules / css-loader / lib / processCss.js View on Github external
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]
				});
			})
		});