Run command after webpack watch ended

Viewed 137

I'd like to run webpack (5.15.0) in --watch mode, and run a some action after watch ended.

I'm trying to use watchClose hook, but it never fired

    plugins: [
        ...,
        {
            apply: (compiler) => {
                compiler.hooks.watchClose.tap('WatchClosePlugin', () => {
                    console.log("watchClose");
                });
            }
        }
    ]

Is there any way to execute a script after watch ended?

0 Answers
Related