Skip to content

Commit 7da461b

Browse files
devversionjelbourn
authored andcommitted
build: provide better defaults for browser-sync (#14296)
* No longer opens the browser by default * No longer enables ghost mode by default * No longer shows the `Connected to Browsersync` notification. This might throw off e2e test results.
1 parent ce8a938 commit 7da461b

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

tools/gulp/util/task_helpers.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,14 @@ export function serverTask(packagePath: string, rewrites?: {from: string, to: st
153153
server: projectDir,
154154
port: 4200,
155155
middleware: httpRewrite.getMiddleware(rewrites || defaultHttpRewrites),
156+
notify: false,
157+
158+
// Options which are disabled by default. We don't want to enable ghostMode by default
159+
// because it can throw-off change detection due to the event listeners syncing events
160+
// between browsers. Also opening the browser is not always desired because in some cases
161+
// developers just want to serve the app, and open the browser on a different device.
162+
ghostMode: process.argv.includes('--ghostMode'),
163+
open: process.argv.includes('--open'),
156164
});
157165
};
158166
}

0 commit comments

Comments
 (0)