-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Server callback is barely useful #847
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
A callback that fires when compilation is finished is available as I happen to have made a test suite runner like you have too, this is some code out of mine: compiler.plugin('done', (stats) => {
stats = stats.toJson();
if (stats.errors && stats.errors.length > 0) {
// show errors
return;
}
// compilation success
}); The |
Ha, well I'll be damned. |
is there a way to catch this error...
happens when the host domain doesnt exist on the machine, i want to log an error telling the devs to add a hostfile entry. |
Do you want to request a feature or report a bug?
I am not sure whether this is by design (in which case I want to request a change), or a bug.
What is the current behavior?
The callback for
listen
is called immediately after the server is reachable on the specified port.If the current behavior is a bug, please provide the steps to reproduce.
What is the expected behavior?
I expected the callback to be called after compilation had finished (and all javascript bundles were created). This is because my callback is a testing suite which needs the server online (currently the callback satisfies this), but also needs the files to be already-created.
If this is a feature request, what is motivation or use case for changing the behavior?
I want to request the option to be able to run a function after the initial compiling finishes, so that I can run my test suites.
Please mention your webpack and Operating System version.
webpack ^2, webpack-dev-server ^2, ubuntu 14.04
The text was updated successfully, but these errors were encountered: