Skip to content

Commit

Permalink
refactor(@angular-devkit/build-angular): additional webpack 5 type im…
Browse files Browse the repository at this point in the history
…provements

Additional support for building with Webpack 5.
  • Loading branch information
clydin committed Oct 7, 2020
1 parent 811966a commit 0fe20bc
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Expand Up @@ -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[];
Expand Down
Expand Up @@ -36,7 +36,7 @@ function hook(
});
} else {
compilation.hooks.optimizeChunkAssets
.tapPromise(PLUGIN_NAME, (chunks: compilation.Chunk[]) => {
.tapPromise(PLUGIN_NAME, (chunks: Iterable<compilation.Chunk>) => {
const files: string[] = [];
for (const chunk of chunks) {
if (!chunk.files) {
Expand Down

0 comments on commit 0fe20bc

Please sign in to comment.