Merge pull request #5625 from gyandeeps/issue5576

Fix: Add path separator to avoid file and folder name mixup(fixes #5576)
This commit is contained in:
Tobias Koppers 2017-09-07 00:07:29 +02:00 committed by GitHub
commit 2206ee0e55
6 changed files with 20 additions and 1 deletions

View File

@ -537,7 +537,7 @@ module.exports = function(yargs, argv, convertOptions) {
if(i < 0 || (j >= 0 && j < i)) {
var resolved = path.resolve(content);
if(fs.existsSync(resolved)) {
addTo("main", resolved);
addTo("main", `${resolved}${fs.statSync(resolved).isDirectory() ? path.sep : ""}`);
} else {
addTo("main", content);
}

View File

@ -0,0 +1 @@
module.exports = "fileA";

View File

@ -0,0 +1 @@

View File

@ -0,0 +1,13 @@
"use strict";
module.exports = function testAssertions(code, stdout, stderr) {
code.should.be.eql(2);
stdout[0].should.containEql("Hash: ");
stdout[1].should.containEql("Version: ");
stdout[2].should.containEql("Time: ");
stdout[4].should.containEql("ERROR in Entry module not found: Error: Can't resolve");
stderr.should.be.empty();
};

View File

@ -0,0 +1,3 @@
a
bundle.js

View File

@ -0,0 +1 @@
module.exports = {};