Issue 1:
report a bug

I think it's a bug.

current behavior & the steps to reproduce

I add the plugin:

plugins: [ /**/ new webpack.optimize.MinChunkSizePlugin({ minChunkSize: 10000 }), /**/ ]

in webpack.config.js.

When I bundle my application, I got:

/**/*/node_modules/webpack/lib/optimize/MinChunkSizePlugin.js:59

pair[2].integrate(pair[3], "min-size");

^

TypeError: pair[2].integrate is not a function

at Compilation.compilation.plugin (//*/node_modules/webpack/lib/optimize/MinChunkSizePlugin.js:59:13)

at Compilation.applyPluginsBailResult1 (///node_modules/tapable/lib/Tapable.js:120:27)

at Compilation.seal (/**//node_modules/webpack/lib/Compilation.js:572:9)

at //*/node_modules/webpack/lib/Compiler.js:488:16

at ///node_modules/tapable/lib/Tapable.js:225:11

at _addModuleChain (/**//node_modules/webpack/lib/Compilation.js:477:11)

at processModuleDependencies.err (/**/*/node_modules/webpack/lib/Compilation.js:448:13)

at _combinedTickCallback (internal/process/next_tick.js:67:7)

at process._tickCallback (internal/process/next_tick.js:98:9)

But if I remove the MinChunkSizePlugin, the bundle will be succeeded.

other relevant information

"webpack": "^2.3.0"

bundle cli: cross-env NODE_ENV=production webpack --display-modules --sort-modules-by size

Issue 2:
Bug report

I have the following config (optimization part):

optimization: {
runtimeChunk: {
name: 'runtime',
},

splitChunks: {
minChunks: 2,
minSize: 30000,

cacheGroups: {
clientApplication: {
name: 'clientApplication',
test: /applications\/client/,
chunks: 'all',
enforce: true,
},
},
},

What is the current behavior?

Error in logs while production build:

/Users/a.malko/Work/frontend/node_modules/schema-utils/dist/validate.js:96
throw new _ValidationError.default(errors, schema, configuration);
^
ValidationError: Invalid configuration object. Webpack has been initialized using a configuration object that does not match the API schema.
- configuration.optimization.splitChunks should be one of these:
false | object { automaticNameDelimiter?, cacheGroups?, chunks?, enforceSizeThreshold?, fallbackCacheGroup?, filename?, hidePathInfo?, maxAsyncRequests?, maxAsyncSize?, maxInitialRequests?, maxInitialSize?, maxSize?, minChunks?, minRemainingSize?, minSize?, name?, usedExports? }
-> Optimize duplication and caching by splitting chunks by shared modules and cache group.
Details:
* configuration.optimization.splitChunks.cacheGroups['clientApplication'].test should be one of these:
RegExp | string | function
-> Assign modules to a cache group by module name.
Details:
* configuration.optimization.splitChunks.cacheGroups['clientApplication'].test should be an instance of RegExp.
* configuration.optimization.splitChunks.cacheGroups['clientApplication'].test should be a string.
* configuration.optimization.splitChunks.cacheGroups['clientApplication'].test should be an instance of function.
at validate (/Users/a.malko/Work/frontend/node_modules/schema-utils/dist/validate.js:96:11)
at validateSchema (/Users/a.malko/Work/frontend/node_modules/webpack/lib/validateSchema.js:45:2)
at webpack (/Users/a.malko/Work/frontend/node_modules/webpack/lib/webpack.js:100:2)
at f (/Users/a.malko/Work/frontend/node_modules/webpack/lib/index.js:31:15)
at processOptions (/Users/a.malko/Work/frontend/node_modules/webpack-cli/bin/cli.js:272:16)
at /Users/a.malko/Work/frontend/node_modules/webpack-cli/bin/cli.js:364:3
at Object.parse (/Users/a.malko/Work/frontend/node_modules/yargs/yargs.js:576:18)
at /Users/a.malko/Work/frontend/node_modules/webpack-cli/bin/cli.js:49:8
at Object.<anonymous> (/Users/a.malko/Work/frontend/node_modules/webpack-cli/bin/cli.js:366:3)
at Module._compile (internal/modules/cjs/loader.js:1176:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1196:10)
at Module.load (internal/modules/cjs/loader.js:1040:32)
at Function.Module._load (internal/modules/cjs/loader.js:929:14)
at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:71:12)
at internal/main/run_main_module.js:17:47

If the current behavior is a bug, please provide the steps to reproduce.

You can clone this repo https://github.com/artem-malko/webpack-5-beta-config-bug and try it by yourself.

What is the expected behavior?

No errors)

Other relevant information:

webpack version: v5.0.0-beta.26-v5.0.0-beta.29

Node.js version: v14.1.0

Operating System: macOS Catalina

Additional tools: