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 authored and Michael Cebrian committed Sep 1, 2016
1 parent 440d767 commit 828ef20
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
5 changes: 4 additions & 1 deletion addon/ng2/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
1 change: 1 addition & 0 deletions 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 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
}
}

0 comments on commit 828ef20

Please sign in to comment.