-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
Add server reference to bundler #822
Add server reference to bundler #822
Conversation
Actually, |
Codecov Report
@@ Coverage Diff @@
## master #822 +/- ##
==========================================
- Coverage 93.41% 90.16% -3.26%
==========================================
Files 68 68
Lines 3753 3181 -572
==========================================
- Hits 3506 2868 -638
- Misses 247 313 +66
Continue to review full report at Codecov.
|
Wouldn't
|
Missed this part. Expecting the CLI to continue to call |
src/Bundler.js
Outdated
@@ -575,6 +575,7 @@ class Bundler extends EventEmitter { | |||
|
|||
async serve(port = 1234, https = false) { | |||
let server = await Server.serve(this, port, https); | |||
this.server = server; | |||
this.bundle(); | |||
return server; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do:
this.server = await Server.serve(this, port, https);
this.bundle();
return this.server;
I don't see how this change could cause the AppVeyor build to fail. Do I need to do anything? |
@fusepilot it's a rust test that fails from time to time, no need to worry about it |
* add server reference to bundler * remove let
* add server reference to bundler * remove let
I need to get the development server's port number for use in a plugin. Attaching the server to the bundler allows me to call
bundler.server.address().port
. This seems to be the only way to access it since the server's port can vary if the user provided port is already being used.