Skip to content

Commit 90e2e80

Browse files
clydinhansl
authored andcommitted
feat(@angular/cli): can disable unsupported serve path warning
1 parent e87209c commit 90e2e80

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

packages/@angular/cli/lib/config/schema.json

+5
Original file line numberDiff line numberDiff line change
@@ -614,6 +614,11 @@
614614
"description": "Show a warning when the TypeScript version is incompatible",
615615
"type": "boolean",
616616
"default": true
617+
},
618+
"servePathDefault": {
619+
"description": "Show a warning when deploy-url/base-href use unsupported serve path values.",
620+
"type": "boolean",
621+
"default": true
617622
}
618623
}
619624
}

packages/@angular/cli/tasks/serve.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,8 @@ export default Task.extend({
193193
if (!servePath && servePath !== '') {
194194
const defaultServePath =
195195
findDefaultServePath(serveTaskOptions.baseHref, serveTaskOptions.deployUrl);
196-
if (defaultServePath == null) {
196+
const showWarning = CliConfig.fromProject().get('warnings.servePathDefault');
197+
if (defaultServePath == null && showWarning) {
197198
ui.writeLine(oneLine`
198199
${chalk.yellow('WARNING')} --deploy-url and/or --base-href contain
199200
unsupported values for ng serve. Default serve path of '/' used.

0 commit comments

Comments
 (0)