MyCrypto/webpack_config/plugins/delay.js

16 lines
289 B
JavaScript

'use strict';
const DelayPlugin = function(delayMs) {
this.delayMs = delayMs;
};
DelayPlugin.prototype.apply = function(compiler) {
compiler.plugin('before-run', (compiler, done) => {
setTimeout(() => {
done();
}, this.delayMs);
});
};
module.exports = DelayPlugin;