Skip to content

Commit 7253802

Browse files
alan-agius4mgechev
authored andcommitted
refactor(@angular-devkit/build-angular): change hmr-accept to TypeScript
For the time being we cannot use the DOM lib because it conflicts with Node, In future when we remove `yarn admin build` we should have this as a seperate compilation unit.
1 parent c345ec3 commit 7253802

File tree

4 files changed

+230
-215
lines changed

4 files changed

+230
-215
lines changed

packages/angular_devkit/build_angular/BUILD.bazel

+1
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,7 @@ ts_library(
103103
"//packages/angular_devkit/core/node",
104104
"//packages/ngtools/webpack",
105105
"@npm//@angular/compiler-cli",
106+
"@npm//@angular/core",
106107
"@npm//@angular/localize",
107108
"@npm//@angular/service-worker",
108109
"@npm//@babel/core",

packages/angular_devkit/build_angular/src/webpack/plugins/common-js-usage-warn-plugin.ts

+4-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,10 @@ export class CommonJsUsageWarnPlugin {
3737
// Allow the below dependency for HMR
3838
// tslint:disable-next-line: max-line-length
3939
// https://github.com/angular/angular-cli/blob/1e258317b1f6ec1e957ee3559cc3b28ba602f3ba/packages/angular_devkit/build_angular/src/dev-server/index.ts#L605-L638
40-
private allowedDependencies = new Set<string>(['webpack/hot/dev-server']);
40+
private allowedDependencies = new Set<string>([
41+
'webpack/hot/dev-server',
42+
'@angular-devkit/build-angular',
43+
]);
4144

4245
constructor(private options: CommonJsUsageWarnPluginOptions = {}) {
4346
this.options.allowedDependencies?.forEach(d => this.allowedDependencies.add(d));

packages/angular_devkit/build_angular/src/webpack/plugins/hmr/hmr-accept.js

-214
This file was deleted.

0 commit comments

Comments
 (0)