Skip to content

Commit 828ef20

Browse files
JSMikeMichael Cebrian
authored andcommitted
feat(webpackDevServer): Add watchOptions for webpackDevServer
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 440d767 commit 828ef20

File tree

3 files changed

+9
-2
lines changed

3 files changed

+9
-2
lines changed

addon/ng2/tasks/serve-webpack.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,10 @@ export default Task.extend({
5454
historyApiFallback: true,
5555
stats: webpackDevServerOutputOptions,
5656
inline: true,
57-
proxy: proxyConfig
57+
proxy: proxyConfig,
58+
watchOptions: {
59+
poll: CliConfig.fromProject().config.defaults.poll
60+
}
5861
};
5962

6063
ui.writeLine(chalk.green(oneLine`

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
}

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+
}

0 commit comments

Comments
 (0)