mirror of https://github.com/embarklabs/embark.git
fix(@embark/config): disable webserver if pipeline is disabled
The webserver's job is to serve files generated by Embark's built-in pipeline, however, since v4 users can choose they front-end tool to take care of building, bundling and packing their DApps. Usually these tools come with a built-in dev server as well. Therefore, when the pipeline is turned off (which also soon will be the default), there's not need start a webserver.
This commit is contained in:
parent
9e5c9c7f17
commit
24b53395b0
|
@ -16,6 +16,7 @@ class WebServer {
|
|||
this.fs = embark.fs;
|
||||
this.buildDir = embark.config.buildDir;
|
||||
this.webServerConfig = embark.config.webServerConfig;
|
||||
|
||||
if (!this.webServerConfig.enabled) {
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -532,6 +532,10 @@ Config.prototype.loadWebServerConfigFile = function() {
|
|||
this.webServerConfig = webServerConfig;
|
||||
}
|
||||
|
||||
if (!this.pipelineConfig.enabled) {
|
||||
this.webServerConfig.enabled = false;
|
||||
}
|
||||
|
||||
this.events.emit('config:load:webserver', this.webServerConfig);
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in New Issue