Skip to content

Commit 015dbbb

Browse files
JSMikeJonathan Jayet
authored and
Jonathan Jayet
committed
feat(webpackDevServer): Add watchOptions for webpackDevServer (angular#1814)
Add watchOptions to webpackDevServerConfiguration to conditionally enable polling option in watchpack Remove additional blank lines from end of serve-watchpack.ts so that only one is remaining
1 parent 7e9e519 commit 015dbbb

File tree

3 files changed

+9
-2
lines changed

3 files changed

+9
-2
lines changed

packages/angular-cli/lib/config/schema.d.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,5 +59,6 @@ export interface CliConfig {
5959
defaults?: {
6060
styleExt?: string;
6161
prefixInterfaces?: boolean;
62+
poll?: number;
6263
};
6364
}

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

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,10 +135,13 @@
135135
},
136136
"prefixInterfaces": {
137137
"type": "boolean"
138+
},
139+
"poll": {
140+
"type": "number"
138141
}
139142
},
140143
"additionalProperties": false
141144
}
142145
},
143146
"additionalProperties": false
144-
}
147+
}

packages/angular-cli/tasks/serve-webpack.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,10 @@ export default Task.extend({
6969
stats: webpackDevServerOutputOptions,
7070
inline: true,
7171
https: commandOptions.ssl,
72-
proxy: proxyConfig
72+
proxy: proxyConfig,
73+
watchOptions: {
74+
poll: CliConfig.fromProject().config.defaults.poll
75+
}
7376
};
7477

7578
if (sslKey != null && sslCert != null) {

0 commit comments

Comments
 (0)