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 Aug 25, 2016
1 parent e9ea554 commit 350b667
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
9 changes: 4 additions & 5 deletions addon/ng2/tasks/serve-webpack.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,10 @@ module.exports = 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 All @@ -76,7 +79,3 @@ module.exports = Task.extend({
});
}
});




1 change: 1 addition & 0 deletions lib/config/schema.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,5 +60,6 @@ export interface CliConfig {
styleExt?: string;
prefixInterfaces?: boolean;
lazyRoutePrefix?: string;
poll?: boolean | number;
};
}
3 changes: 3 additions & 0 deletions lib/config/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,9 @@
},
"lazyRoutePrefix": {
"type": "string"
},
"poll": {
"type": [ "boolean", "number" ]
}
},
"additionalProperties": false
Expand Down

0 comments on commit 350b667

Please sign in to comment.