Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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