webpack-sources
Advanced tools
Comparing version 2.0.0-beta.2 to 2.0.0-beta.3
@@ -45,19 +45,21 @@ /* | ||
node.walk(function(chunk, mapping) { | ||
const parts = chunk.split("\n"); | ||
const parts = chunk.split(/(\n)/); | ||
for (let i = 0; i < parts.length; i += 2) { | ||
const nl = i + 1 < parts.length; | ||
const part = parts[i] + (nl ? "\n" : ""); | ||
if (part && needPrefix) { | ||
output.push(prefix); | ||
if (part) { | ||
if (needPrefix) { | ||
output.push(prefix); | ||
} | ||
output.push( | ||
new SourceNode( | ||
mapping.line, | ||
mapping.column, | ||
mapping.source, | ||
part, | ||
mapping.name | ||
) | ||
); | ||
needPrefix = nl; | ||
} | ||
output.push( | ||
new SourceNode( | ||
mapping.line, | ||
mapping.column, | ||
mapping.source, | ||
chunk, | ||
mapping.name | ||
) | ||
); | ||
needPrefix = nl; | ||
} | ||
@@ -64,0 +66,0 @@ }); |
{ | ||
"name": "webpack-sources", | ||
"version": "2.0.0-beta.2", | ||
"version": "2.0.0-beta.3", | ||
"description": "Source code handling classes for webpack", | ||
@@ -5,0 +5,0 @@ "main": "./lib/index.js", |
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
39540
1158