Skip to content

Commit b9ad5e1

Browse files
committed
feat(webpackDevServer): Add watchOptions for webpackDevServer
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
1 parent f9df8bb commit b9ad5e1

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

addon/ng2/tasks/serve-webpack.ts

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,10 @@ module.exports = Task.extend({
4545
historyApiFallback: true,
4646
stats: webpackDevServerOutputOptions,
4747
inline: true,
48-
proxy: proxyConfig
48+
proxy: proxyConfig,
49+
watchOptions: {
50+
poll: CliConfig.fromProject().config.defaults.poll
51+
}
4952
};
5053

5154
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({
7073
})
7174
}
7275
});
73-
74-
75-
76-

lib/config/schema.d.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,5 +60,6 @@ export interface CliConfig {
6060
styleExt?: string;
6161
prefixInterfaces?: boolean;
6262
lazyRoutePrefix?: string;
63+
poll?: boolean | number;
6364
};
6465
}

0 commit comments

Comments
 (0)