From 00950107780a54dbed1346fe769d43d784b99fbf Mon Sep 17 00:00:00 2001 From: Alan Agius <17563226+alan-agius4@users.noreply.github.com> Date: Mon, 19 Oct 2026 08:18:04 +0000 Subject: [PATCH] refactor(@angular-devkit/build-angular): update internal webpack dependency paths Update internal webpack dependency deep imports to match the reorganized module structure in Webpack 5.112.0. --- .../tools/webpack/plugins/common-js-usage-warn-plugin.ts | 8 ++++---- .../src/tools/webpack/plugins/named-chunks-plugin.ts | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/packages/angular_devkit/build_angular/src/tools/webpack/plugins/common-js-usage-warn-plugin.ts b/packages/angular_devkit/build_angular/src/tools/webpack/plugins/common-js-usage-warn-plugin.ts index 2374243b3121..59e56bf7abfb 100644 --- a/packages/angular_devkit/build_angular/src/tools/webpack/plugins/common-js-usage-warn-plugin.ts +++ b/packages/angular_devkit/build_angular/src/tools/webpack/plugins/common-js-usage-warn-plugin.ts @@ -11,10 +11,10 @@ import { Compilation, Compiler, Dependency, Module, NormalModule } from 'webpack import { addWarning } from '../../../utils/webpack-diagnostics'; // Webpack doesn't export these so the deep imports can potentially break. -const AMDDefineDependency = require('webpack/lib/dependencies/AMDDefineDependency'); -const CommonJsExportsDependency = require('webpack/lib/dependencies/CommonJsExportsDependency'); -const CommonJsRequireDependency = require('webpack/lib/dependencies/CommonJsRequireDependency'); -const CommonJsSelfReferenceDependency = require('webpack/lib/dependencies/CommonJsSelfReferenceDependency'); +const AMDDefineDependency = require('webpack/lib/dependencies/amd/AMDDefineDependency'); +const CommonJsExportsDependency = require('webpack/lib/dependencies/commonjs/CommonJsExportsDependency'); +const CommonJsRequireDependency = require('webpack/lib/dependencies/commonjs/CommonJsRequireDependency'); +const CommonJsSelfReferenceDependency = require('webpack/lib/dependencies/commonjs/CommonJsSelfReferenceDependency'); export interface CommonJsUsageWarnPluginOptions { /** A list of CommonJS or AMD packages that are allowed to be used without a warning. Use `'*'` to allow all. */ diff --git a/packages/angular_devkit/build_angular/src/tools/webpack/plugins/named-chunks-plugin.ts b/packages/angular_devkit/build_angular/src/tools/webpack/plugins/named-chunks-plugin.ts index bc838b2f6a3a..417d11484ef7 100644 --- a/packages/angular_devkit/build_angular/src/tools/webpack/plugins/named-chunks-plugin.ts +++ b/packages/angular_devkit/build_angular/src/tools/webpack/plugins/named-chunks-plugin.ts @@ -9,7 +9,7 @@ import { AsyncDependenciesBlock, Chunk, Compiler, Template, dependencies } from 'webpack'; // `ImportDependency` is not part of Webpack's depenencies typings. -const ImportDependency: typeof dependencies.ModuleDependency = require('webpack/lib/dependencies/ImportDependency'); +const ImportDependency: typeof dependencies.ModuleDependency = require('webpack/lib/dependencies/import/ImportDependency'); const PLUGIN_NAME = 'named-chunks-plugin';