diff --git a/index.js b/index.js index b3fc0ec..07bfcc5 100644 --- a/index.js +++ b/index.js @@ -1,26 +1,25 @@ -const { glob } = require('glob') +const _ = require('lodash'); const HtmlWebpackPlugin = require('html-webpack-plugin'); +const path = require("path"); +const { glob } = require('glob'); class WebpackForceReload { constructor(options = {}) { let that = this; this.options = options; this.resolvedFiles = []; - console.debug(this.options); glob.glob( this.options.files, { cwd: this.options.cwd }, function(err, matches) { - console.debug(matches); _.forEach(matches, function(value) { var resolvedFile = path.resolve(value); that.resolvedFiles.push(resolvedFile); } ); }); - console.debug(this.resolvedFiles); } apply (compiler) { compiler.hooks.compilation.tap('WebpackForceReload', (compilation) => {