css-loader
Advanced tools
Comparing version 0.5.2 to 0.6.0
12
index.js
@@ -6,2 +6,4 @@ /* | ||
var csso = require("csso"); | ||
var SourceNode = require("source-map").SourceNode; | ||
var loaderUtils = require("loader-utils"); | ||
module.exports = function(content) { | ||
@@ -37,3 +39,11 @@ this.cacheable && this.cacheable(); | ||
result.push(css); | ||
return "module.exports =\n\t" + result.join(" +\n\t") + ";"; | ||
var cssRequest = loaderUtils.getRemainingRequest(this); | ||
var node = new SourceNode(1, 0, | ||
cssRequest, | ||
"module.exports =\n\t" + result.join(" +\n\t") + ";"); | ||
var stringWithMap = node.toStringWithSourceMap({ | ||
file: loaderUtils.getCurrentRequest(this) | ||
}); | ||
stringWithMap.map.setSourceContent(cssRequest, content); | ||
this.callback(null, stringWithMap.code, stringWithMap.map.toJSON()); | ||
} | ||
@@ -40,0 +50,0 @@ |
{ | ||
"name": "css-loader", | ||
"version": "0.5.2", | ||
"version": "0.6.0", | ||
"author": "Tobias Koppers @sokra", | ||
"description": "css loader module for webpack", | ||
"dependencies": { | ||
"csso": "1.3.x" | ||
"csso": "1.3.x", | ||
"source-map": "0.1.x", | ||
"loader-utils": "0.2.x" | ||
}, | ||
@@ -9,0 +11,0 @@ "devDependencies": { |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
4613
117
3
+ Addedloader-utils@0.2.x
+ Addedsource-map@0.1.x
+ Addedamdefine@1.0.1(transitive)
+ Addedbig.js@3.2.0(transitive)
+ Addedemojis-list@2.1.0(transitive)
+ Addedjson5@0.5.1(transitive)
+ Addedloader-utils@0.2.17(transitive)
+ Addedobject-assign@4.1.1(transitive)
+ Addedsource-map@0.1.43(transitive)