Skip to content

Commit 0742f85

Browse files
author
Chuck Dumont
authored
Merge pull request #1 from chuckdumont/work
Add support for webpack 4
2 parents c5cfc39 + 4c191ba commit 0742f85

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

index.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
/*
2-
* (C) Copyright IBM Corp. 2012, 2016 All Rights Reserved.
2+
* (C) Copyright HCL Technologies Ltd. 2018
3+
* (C) Copyright IBM Corp. 2012, 2017 All Rights Reserved.
34
*
45
* Licensed under the Apache License, Version 2.0 (the "License");
56
* you may not use this file except in compliance with the License.
@@ -13,6 +14,7 @@
1314
* See the License for the specific language governing permissions and
1415
* limitations under the License.
1516
*/
17+
const {tap} = require("webpack-plugin-compat").for("webpack-remove-assets-plugin");
1618

1719
module.exports = class RemoveAssetsPlugin {
1820

@@ -22,7 +24,7 @@ module.exports = class RemoveAssetsPlugin {
2224

2325
apply(compiler) {
2426

25-
compiler.plugin('after-compile', (compilation, callback) => {
27+
tap(compiler, 'after-compile', (compilation, callback) => {
2628
var nDel = 0;
2729
for (var filename in compilation.assets) {
2830
if (this.options.regex.test(filename)) {

package.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,15 @@
11
{
22
"name": "webpack-remove-assets-plugin",
3-
"version": "1.0.0",
3+
"version": "1.0.1-0",
44
"peerDependencies": {
55
"webpack": ">= 2.2.0"
66
},
77
"license": "(Apache-2.0)",
88
"repository": {
99
"type": "git",
1010
"url": "git+https://github.com/chuckdumont/webpack-remove-assets-plugin.git"
11+
},
12+
"dependencies": {
13+
"webpack-plugin-compat": "^1.0.1"
1114
}
1215
}

0 commit comments

Comments
 (0)