File tree Expand file tree Collapse file tree 3 files changed +12
-3
lines changed Expand file tree Collapse file tree 3 files changed +12
-3
lines changed Original file line number Diff line number Diff line change @@ -2,5 +2,6 @@ language: node_js
2
2
node_js :
3
3
- " 4"
4
4
- " 6"
5
+ - " 8"
5
6
script :
6
7
- npm test
Original file line number Diff line number Diff line change @@ -14,7 +14,11 @@ HtmlWebpackExcludeAssetsPlugin.prototype.apply = function (compiler) {
14
14
var excludeAssets = htmlPluginData . plugin . options . excludeAssets ;
15
15
// Skip if the plugin configuration didn't set `excludeAssets`
16
16
if ( ! excludeAssets ) {
17
- return callback ( null , htmlPluginData ) ;
17
+ if ( callback ) {
18
+ return callback ( null , htmlPluginData ) ;
19
+ } else {
20
+ return Promise . resolve ( htmlPluginData )
21
+ }
18
22
}
19
23
20
24
if ( excludeAssets . constructor !== Array ) {
@@ -27,7 +31,11 @@ HtmlWebpackExcludeAssetsPlugin.prototype.apply = function (compiler) {
27
31
} ) ;
28
32
29
33
var result = self . processAssets ( excludePatterns , htmlPluginData ) ;
30
- callback ( null , result ) ;
34
+ if ( callback ) {
35
+ callback ( null , result ) ;
36
+ } else {
37
+ return Promise . resolve ( result )
38
+ }
31
39
} ) ;
32
40
} ) ;
33
41
} ;
Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " html-webpack-exclude-assets-plugin" ,
3
- "version" : " 0.0.5 " ,
3
+ "version" : " 0.0.6 " ,
4
4
"description" : " Add the ability to exclude assets based on RegExp patterns" ,
5
5
"main" : " index.js" ,
6
6
"files" : [
You can’t perform that action at this time.
0 commit comments