Skip to content

Commit

Permalink
feat(webpackDevServer): Add watchOptions for webpackDevServer (#1814)
Browse files Browse the repository at this point in the history
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
  • Loading branch information
JSMike authored and hansl committed Sep 26, 2016
1 parent 4fc5ed7 commit ce03088
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
1 change: 1 addition & 0 deletions packages/angular-cli/lib/config/schema.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,5 +59,6 @@ export interface CliConfig {
defaults?: {
styleExt?: string;
prefixInterfaces?: boolean;
poll?: number;
};
}
5 changes: 4 additions & 1 deletion packages/angular-cli/lib/config/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -135,10 +135,13 @@
},
"prefixInterfaces": {
"type": "boolean"
},
"poll": {
"type": "number"
}
},
"additionalProperties": false
}
},
"additionalProperties": false
}
}
5 changes: 4 additions & 1 deletion packages/angular-cli/tasks/serve-webpack.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,10 @@ export default Task.extend({
historyApiFallback: true,
stats: webpackDevServerOutputOptions,
inline: true,
proxy: proxyConfig
proxy: proxyConfig,
watchOptions: {
poll: CliConfig.fromProject().config.defaults.poll
}
};

ui.writeLine(chalk.green(oneLine`
Expand Down

0 comments on commit ce03088

Please sign in to comment.