s00d / webpack-shell-plugin-next

Run shell commands either before or after webpack 4 and 5 builds
MIT License
92 stars 12 forks source link

using webpack 5.70 onBeforeBuild does not run scripts like the other events #36

Closed boltex closed 2 years ago

boltex commented 2 years ago

onBeforeBuild doesnt seem to trigger on my project using webpack 5.70.

Others like onBuildStart all seem to work

enigma1 commented 2 years ago

I was getting the same issue till I set the "dev" flag to false Default is true and will patch the scripts array with an empty one due to the defaultTaks settings. I used the watchRun in my case but it's the same for beforeBuild

if (this.dev) { this.onBeforeBuild = JSON.parse(JSON.stringify(defaultTask)) }

const defaultTask: Tasks = { scripts: [], blocking: false, parallel: false }

s00d commented 2 years ago

hello. Try 2.3.1

enigma1 commented 2 years ago

by the way where is the 2.3.1 release? The latest shows as 2.2.2

s00d commented 2 years ago

https://www.npmjs.com/package/webpack-shell-plugin-next/v/2.3.1