Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions lib/webpackPlugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,10 @@ class WebpackPlugin {
throw new Error('Unsupported additionalEntries data type. Make sure it is array or function');
}
}else{
this.config.entry[chunkName] = [file.path];
if(!Array.isArray(this.config.entry[chunkName])) {
this.config.entry[chunkName] = []
}
this.config.entry[chunkName].push(file.path);
}
}

Expand Down Expand Up @@ -114,7 +117,7 @@ class WebpackPlugin {
}

compileCallback(err, stats){

// error handling
if(err){
this.error(err);
Expand Down Expand Up @@ -181,7 +184,7 @@ class WebpackPlugin {
// seems that vinyl-fs doesn't set file.stem for us
let filename = path.basename(file.path);

return gutil.replaceExtension(filename, '');
return file.named || gutil.replaceExtension(filename, '');
}

prepareConfig(){
Expand Down