diff --git a/addon/ng2/tasks/serve-webpack.ts b/addon/ng2/tasks/serve-webpack.ts index 8fe322e1a319..cffbc24578f3 100644 --- a/addon/ng2/tasks/serve-webpack.ts +++ b/addon/ng2/tasks/serve-webpack.ts @@ -45,7 +45,10 @@ module.exports = Task.extend({ historyApiFallback: true, stats: webpackDevServerOutputOptions, inline: true, - proxy: proxyConfig + proxy: proxyConfig, + watchOptions: { + poll: CliConfig.fromProject().config.defaults.poll + } }; const serveMessage:string = chalk.green(`\n*\n*\n NG Live Development Server is running on http://${commandOptions.host}:${commandOptions.port}.\n*\n*`); @@ -70,7 +73,3 @@ module.exports = Task.extend({ }) } }); - - - - diff --git a/lib/config/schema.d.ts b/lib/config/schema.d.ts index 68849bc3c920..aefbd6f31c05 100644 --- a/lib/config/schema.d.ts +++ b/lib/config/schema.d.ts @@ -60,5 +60,6 @@ export interface CliConfig { styleExt?: string; prefixInterfaces?: boolean; lazyRoutePrefix?: string; + poll?: boolean | number; }; } diff --git a/lib/config/schema.json b/lib/config/schema.json index 412f8eb0ed60..031b13471342 100644 --- a/lib/config/schema.json +++ b/lib/config/schema.json @@ -138,6 +138,9 @@ }, "lazyRoutePrefix": { "type": "string" + }, + "poll": { + "type": [ "boolean", "number" ] } }, "additionalProperties": false