Skip to content
This repository has been archived by the owner on Feb 7, 2022. It is now read-only.

Add --silent option #105

Open
marcofugaro opened this issue Sep 21, 2020 · 0 comments
Open

Add --silent option #105

marcofugaro opened this issue Sep 21, 2020 · 0 comments

Comments

@marcofugaro
Copy link

Explain the problem

In my webpack.config.js, I have implemented my own logging system, where I log to the console when a bundle has started building, and when it has finished.

This results in double the logging:
Screenshot 2020-09-15 at 12 27 27

I would like to disable the loggings of parallel-webpack.

Expected Behaviour

With --silent option nothing should be outputted.

Provide your webpack config

I am using the event-hooks-webpack-plugin

    plugins: [
      new EventHooksPlugin({
        compile() {
          console.log()
          console.log('⏳  Compiling...')
        },
        done(stats) {
          if (stats.hasErrors()) {
            const statsJson = stats.toJson({ all: false, warnings: true, errors: true })
            const messages = formatWebpackMessages(statsJson)
            console.log()
            console.log(chalk.red('❌  Failed to compile.'))
            console.log()
            console.log(messages.errors[0])
            return
          }

          const time = prettyMs(stats.endTime - stats.startTime)
          console.log()
          console.log(chalk.green(`✅  Compiled successfully in ${chalk.cyan(time)}`))
        },
      }),
    ],

Provide your Environment details

  • Node version: 14.5.0

  • Operating System: macOS Catalina

  • webpack version: 4.44.2

  • parallel-webpack version: 2.6.0

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant