Skip to content

Commit

Permalink
feat(webpackDevServer): Add watchOptions for webpackDevServer
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 committed Sep 13, 2016
1 parent b6a2165 commit 7bf6734
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 7bf6734

Please sign in to comment.