From 5d91dacd12f95c829b9c16cf0de4b0bcae7eabe2 Mon Sep 17 00:00:00 2001 From: Matteo Tomasoni Date: Fri, 29 Mar 2019 15:41:14 +0100 Subject: [PATCH] Changed Webpack hook from 'run' to 'after-plugins' so that the output of this plugin could be used by other plugins (for example by copy-webpack-plugin) --- index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/index.js b/index.js index e869e1d..1cc117a 100644 --- a/index.js +++ b/index.js @@ -34,9 +34,9 @@ var CreateFilePlugin = (function () { const createFile = () => _createFile(this.options.path, this.options.fileName, this.options.content); if (!!compiler.hooks) { - compiler.hooks.done.tap('CreateFileWebpack', createFile()); + compiler.hooks.afterPlugins.tap('CreateFileWebpack', createFile()); } else { - compiler.plugin('done', createFile()); + compiler.plugin('after-plugins', createFile()); } };