diff --git a/packages/angular_devkit/build_angular/src/webpack/plugins/common-js-usage-warn-plugin.ts b/packages/angular_devkit/build_angular/src/webpack/plugins/common-js-usage-warn-plugin.ts index ae0818772799..d9383074aa6a 100644 --- a/packages/angular_devkit/build_angular/src/webpack/plugins/common-js-usage-warn-plugin.ts +++ b/packages/angular_devkit/build_angular/src/webpack/plugins/common-js-usage-warn-plugin.ts @@ -15,8 +15,8 @@ import { isWebpackFiveOrHigher } from '../../utils/webpack-version'; const CommonJsRequireDependency = require('webpack/lib/dependencies/CommonJsRequireDependency'); const AMDDefineDependency = require('webpack/lib/dependencies/AMDDefineDependency'); -// The below is extended because there are not in the typings -interface WebpackModule extends compilation.Module { +// The below is used to remain compatible with both Webpack 4 and 5 +interface WebpackModule { name?: string; rawRequest?: string; dependencies: WebpackModule[]; diff --git a/packages/angular_devkit/build_angular/src/webpack/plugins/optimize-css-webpack-plugin.ts b/packages/angular_devkit/build_angular/src/webpack/plugins/optimize-css-webpack-plugin.ts index e44fc869cebf..649d2b97e034 100644 --- a/packages/angular_devkit/build_angular/src/webpack/plugins/optimize-css-webpack-plugin.ts +++ b/packages/angular_devkit/build_angular/src/webpack/plugins/optimize-css-webpack-plugin.ts @@ -36,7 +36,7 @@ function hook( }); } else { compilation.hooks.optimizeChunkAssets - .tapPromise(PLUGIN_NAME, (chunks: compilation.Chunk[]) => { + .tapPromise(PLUGIN_NAME, (chunks: Iterable) => { const files: string[] = []; for (const chunk of chunks) { if (!chunk.files) {