mirror of
https://github.com/embarklabs/embark.git
synced 2025-01-11 14:24:24 +00:00
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.fs = embark.fs;
|
||||||
this.buildDir = embark.config.buildDir;
|
this.buildDir = embark.config.buildDir;
|
||||||
this.webServerConfig = embark.config.webServerConfig;
|
this.webServerConfig = embark.config.webServerConfig;
|
||||||
|
|
||||||
if (!this.webServerConfig.enabled) {
|
if (!this.webServerConfig.enabled) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -532,6 +532,10 @@ Config.prototype.loadWebServerConfigFile = function() {
|
|||||||
this.webServerConfig = webServerConfig;
|
this.webServerConfig = webServerConfig;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!this.pipelineConfig.enabled) {
|
||||||
|
this.webServerConfig.enabled = false;
|
||||||
|
}
|
||||||
|
|
||||||
this.events.emit('config:load:webserver', this.webServerConfig);
|
this.events.emit('config:load:webserver', this.webServerConfig);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user