clessg / progress-bar-webpack-plugin

A progress bar plugin for Webpack.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

When the webpack is compiling, if there is another log, will cause to two progress bar

tjx666 opened this issue · comments

In my project, the webpack server will log a message when server is successfully startup:

const devServer = express();
devMiddlewares(devServer);

const { HOST, PORT } = serverConfig;
devServer.listen(PORT, HOST, async error => {
    console.log(`${chalk.green.bold('INFO')} DevServer running at ${chalk.magenta.bold.underline(address)} ${chalk.green('✓')}`);
})

devMiddlewares function is:

export default (app: Express): void => {
    const compiler = webpack(devConfig);
    const devMiddlewareOptions: webpackDevMiddleware.Options = {
        //...
    };
    app.use(webpackDevMiddleware(compiler, devMiddlewareOptions));
    app.use(webpackHotMiddleware(compiler, { path: '/__webpack_HMR__' }));
};

I guess this bug is because when the webpack compile progress is 10%, the server callback above is call.

Snipaste_2019-11-26_17-11-52

commented

any updates @tjx666

can we re-open this please?