Skip to content

Commit 2206ee0

Browse files
authored
Merge pull request webpack#5625 from gyandeeps/issue5576
Fix: Add path separator to avoid file and folder name mixup(fixes webpack#5576)
2 parents 92d5c20 + 4f5e78b commit 2206ee0

6 files changed

Lines changed: 20 additions & 1 deletion

File tree

bin/convert-argv.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -537,7 +537,7 @@ module.exports = function(yargs, argv, convertOptions) {
537537
if(i < 0 || (j >= 0 && j < i)) {
538538
var resolved = path.resolve(content);
539539
if(fs.existsSync(resolved)) {
540-
addTo("main", resolved);
540+
addTo("main", `${resolved}${fs.statSync(resolved).isDirectory() ? path.sep : ""}`);
541541
} else {
542542
addTo("main", content);
543543
}
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
module.exports = "fileA";
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
"use strict";
2+
3+
module.exports = function testAssertions(code, stdout, stderr) {
4+
code.should.be.eql(2);
5+
6+
stdout[0].should.containEql("Hash: ");
7+
stdout[1].should.containEql("Version: ");
8+
stdout[2].should.containEql("Time: ");
9+
stdout[4].should.containEql("ERROR in Entry module not found: Error: Can't resolve");
10+
11+
stderr.should.be.empty();
12+
};
13+
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
a
2+
bundle.js
3+
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
module.exports = {};

0 commit comments

Comments
 (0)