Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

css-loader

Package Overview
Dependencies
Maintainers
1
Versions
152
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

css-loader - npm Package Compare versions

Comparing version 0.6.2 to 0.6.3

28

index.js

@@ -12,3 +12,3 @@ /*

var tree = csso.parse(content, "stylesheet");
if(this && this.minimize) {
if(tree && this && this.minimize) {
tree = csso.compress(tree);

@@ -18,16 +18,18 @@ tree = csso.cleanInfo(tree);

var imports = extractImports(tree);
annotateUrls(tree);
if(tree) {
var imports = extractImports(tree);
annotateUrls(tree);
imports.forEach(function(imp) {
if(imp.media.length > 0) {
result.push(JSON.stringify("@media " + imp.media.join("") + "{"));
}
result.push("require(" + JSON.stringify("!" + __filename + "!" + urlToRequire(imp.url)) + ")");
if(imp.media.length > 0) {
result.push(JSON.stringify("}"));
}
});
imports.forEach(function(imp) {
if(imp.media.length > 0) {
result.push(JSON.stringify("@media " + imp.media.join("") + "{"));
}
result.push("require(" + JSON.stringify("!" + __filename + "!" + urlToRequire(imp.url)) + ")");
if(imp.media.length > 0) {
result.push(JSON.stringify("}"));
}
});
}
var css = JSON.stringify(csso.translate(tree));
var css = JSON.stringify(tree ? csso.translate(tree) : "");
var uriRegExp = /%CSSURL\[%(.*?)%\]CSSURL%/g;

@@ -34,0 +36,0 @@ css = css.replace(uriRegExp, function(str) {

{
"name": "css-loader",
"version": "0.6.2",
"version": "0.6.3",
"author": "Tobias Koppers @sokra",

@@ -5,0 +5,0 @@ "description": "css loader module for webpack",

@@ -12,8 +12,6 @@ # css loader for webpack

`@import` will be required with this css loader.
`@import` and `url(...)` are interpreted like `require()` and will be resolved by the css-loader.
Good loaders for requiring your assets are the [file-loader](https://github.com/webpack/file-loader)
and the [url-loader](https://github.com/webpack/url-loader) which you should specify in your config (see below).
`url(...)` will be required. You should define useful loaders by config.
Good loaders to require these files is the [file-loader](https://github.com/webpack/file-loader) and the [url-loader](https://github.com/webpack/url-loader).
### Example config

@@ -26,7 +24,7 @@

module: {
loaders: {
loaders: [
{ test: /\.css/, loader: "style-loader!css-loader" },
{ test: /\.png/, loader: "url-loader?limit=100000&minetype=image/png" },
{ test: /\.jpg/, loader: "file-loader" }
}
]
}

@@ -33,0 +31,0 @@ };

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc