Skip to content

Commit

Permalink
fix: BannerPlugin not working issue
Browse files Browse the repository at this point in the history
  • Loading branch information
leftstick committed Jun 16, 2018
1 parent 4d98a49 commit 02eb14c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
3 changes: 2 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,8 @@ UnminifiedWebpackPlugin.prototype.apply = function(compiler) {
if (bannerPlugin) {
matchedBanners = [file].filter(ModuleFilenameHelpers.matchObject.bind(null, bannerPlugin.options));
}
const source = matchedBanners.length ? bannerPlugin.banner + asset.source() : asset.source();

const source = matchedBanners.length ? bannerPlugin.banner(bannerPlugin.options) + asset.source() : asset.source();
compilation.assets[getFileName(file, path.extname(file).substr(1), options)] = {
source: function() {
return source;
Expand Down
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,10 @@
"homepage": "https://github.com/leftstick/unminified-webpack-plugin#readme",
"devDependencies": {
"del": "^3.0.0",
"mocha": "^5.0.2",
"webpack": "^4.0.0"
"mocha": "^5.2.0",
"webpack": "^4.12.0"
},
"peerDependencies": {
"webpack": "^4.0.0"
"webpack": "^4.12.0"
}
}

0 comments on commit 02eb14c

Please sign in to comment.