cascornelissen / event-hooks-webpack-plugin Goto Github PK
View Code? Open in Web Editor NEWEvent hooks plugin for webpack
License: MIT License
Event hooks plugin for webpack
License: MIT License
I'm currently reworking this plugin to support the new plugin interface introduced in webpack 4. The new version of this plugin will be released as 2.0.0
and will not be compatible with webpack versions lower than 4.
I tried to add hook with event-hooks-webpack-plugin
on done
event.
This hook prints the log line but my log line isn't the last line in the output.
he assets table and build warnings come after log line produced by my EventHooksPlugin
instance;
My EventHooksPlugin
instance is the last in plugins:
webpack config section.
new EventHooksPlugin({
done: () => {
console.log('__TEST__ done');
},
}),
How can I change code to ensure my '__TEST__ done'
line is last in entire webpack output?
The latest version of webpack is 5.2.0
Hey, I love this plugin.
Do you have any idea why the beforeCompile hook gets called twice at the start?
I have this config
module.exports = {
watch: true,
stats: false,
plugins: [
new EventHooksPlugin({
beforeCompile() {
console.log('⏳ Compiling...')
},
],
}
And each time I start the application, it gets called twice. Is this webpack's fault?
I'm receiving this warning
(node:22394) DeprecationWarning: Tapable.plugin is deprecated. Use new API on .hooks
instead
so maybe this going to be a problem in future versions of webpack
Hey there
This plugin is doing almost exactly as I want. However, I am trying to figure out how to get at the stats
error list, but I am not having much success
My setup is as follows
new EventHooksPlugin({
done: stats => {
console.log(stats) // <-- need to access the stats.errors here but it is always `undefined`
exec('./tasks/build.sh', (err, stdout, stderr) => {
if (stdout) process.stdout.write(stdout)
if (stderr) process.stderr.write(stderr)
})
}
})
The webpack docs state the stats
response should include errors
object, but again, it is undefined
Stats Object should include errors
I have logged the stats
result, but it does not include any errors
object?
What I am specifically looking for is the ability to call my exec
script ONLY if the compiler did not have any errors. Is there another way of getting this to happen
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.