MCPcopy Index your code
hub / github.com/webpack/webpack-dev-server / startFullSetup

Function startFullSetup

test/helpers/test-server.js:20–47  ·  view source on GitHub ↗

* @param {Configuration} config configuration * @param {DevServerConfiguration} devServerConfig dev server configuration * @param {(err?: Error) => void=} done done callback * @returns {{ server: Server, compiler: Compiler | MultiCompiler }} server and compiler

(config, devServerConfig, done)

Source from the content-addressed store, hash-verified

18 * @returns {{ server: Server, compiler: Compiler | MultiCompiler }} server and compiler
19 */
20function startFullSetup(config, devServerConfig, done) {
21 // disable watching by default for tests
22 if (typeof devServerConfig.static === "undefined") {
23 devServerConfig.static = false;
24 } else if (devServerConfig.static === null) {
25 // this provides a way of using the default static value
26 delete devServerConfig.static;
27 }
28
29 const compiler = webpack(config);
30
31 server = new Server(devServerConfig, compiler);
32
33 server.startCallback((error) => {
34 if (error && done) {
35 return done(error);
36 }
37
38 if (done) {
39 done();
40 }
41 });
42
43 return {
44 server,
45 compiler,
46 };
47}
48
49/**
50 * @param {Configuration} config configuration

Callers 1

startFunction · 0.85

Calls 1

startCallbackMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…