Hi,
I’m running some scripts with this plugin using the onBeforeBuild, onBuildStart, and onBuildEnd hooks on build process. I’ve noticed that the pre-build scripts execute multiple times regardless. I have recursive function inside node ./build/scripts/cleanupTemp.js task. If onBuildStart has more than one task, the issue occurs
My config:
plugins: [
// Other configs
new WebpackShellPluginNext({
onBeforeBuild: {
scripts: [
'echo "NPM version => $(npm -v)"',
'echo "Node version => $(node -v)"'
]
},
onBuildStart: {
scripts: [
'echo "Webpack Start"',
'node ./build/scripts/cleanupTemp.js'
]
},
onBuildEnd: {
scripts: [
'echo "Webpack End"',
'node ./build/scripts/postBuild.js',
'node ./build/entryLoad.js',
],
blocking: true
}
}),
// Other configs
Log:
Package version: Tested with 2.2.2 and the latest 2.3.3 → same issue.
I have tried with node v22.11.0 and v24.5.0 versions.!
Hi,
I’m running some scripts with this plugin using the onBeforeBuild, onBuildStart, and onBuildEnd hooks on build process. I’ve noticed that the pre-build scripts execute multiple times regardless. I have recursive function inside
node ./build/scripts/cleanupTemp.jstask. If onBuildStart has more than one task, the issue occursMy config:
Log:
Package version: Tested with 2.2.2 and the latest 2.3.3 → same issue.
I have tried with node v22.11.0 and v24.5.0 versions.!