Skip to content

Commit 8475b3d

Browse files
Teamophansl
authored andcommitted
fix(@angular-devkit/build_angular): use webpack 4 hooks for karma plugin
1 parent 7c00838 commit 8475b3d

File tree

1 file changed

+3
-3
lines changed
  • packages/angular_devkit/build_angular/src/angular-cli-files/plugins

1 file changed

+3
-3
lines changed

packages/angular_devkit/build_angular/src/angular-cli-files/plugins/karma.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -67,13 +67,13 @@ const init: any = (config: any, emitter: any, customFileHandlers: any) => {
6767
failureCb = config.buildWebpack.failureCb;
6868

6969
config.reporters.unshift('@angular-devkit/build-angular--event-reporter');
70-
70+
7171
// When using code-coverage, auto-add coverage-istanbul.
7272
config.reporters = config.reporters || [];
7373
if (options.codeCoverage && config.reporters.indexOf('coverage-istanbul') === -1) {
7474
config.reporters.unshift('coverage-istanbul');
7575
}
76-
76+
7777
// Add a reporter that fixes sourcemap urls.
7878
if (options.sourceMap) {
7979
config.reporters.unshift('@angular-devkit/build-angular--sourcemap-reporter');
@@ -135,7 +135,7 @@ const init: any = (config: any, emitter: any, customFileHandlers: any) => {
135135
// we can override the file watcher instead.
136136
webpackConfig.plugins.unshift({
137137
apply: (compiler: any) => { // tslint:disable-line:no-any
138-
compiler.plugin('after-environment', () => {
138+
compiler.hooks.afterEnvironment.tap('karma', () => {
139139
compiler.watchFileSystem = { watch: () => { } };
140140
});
141141
},

0 commit comments

Comments
 (0)