Daniel Ternyak 7930ab6611
Revert "Upgrade to Webpack 4 (#1386)" (#1406)
This reverts commit d19c4f44e6b74fee412e69019cb2c98c876e1c8e.
2018-03-28 14:34:29 -05:00

21 lines
471 B
JavaScript

'use strict';
const chalk = require('chalk');
// this plugin if for loggin url after each time the compilation is done.
module.exports = class LogPlugin {
constructor(port) {
this.port = port;
}
apply(compiler) {
const protocol = process.env.HTTPS ? 'https' : 'http';
compiler.plugin('done', () => {
console.log(
`> App is running at ${chalk.yellow(
`${protocol}://localhost:${this.port}`
)}\n`
);
});
}
};