Issue 1:
Bug report

What is the current behavior?

The npx size-limit command fails with the following error

➜ ts-react-components-lib git:(hhimanshu/update-deps) ✗ npx size-limit
✖ Adding to empty webpack project
ERROR WebpackOptionsValidationError: Invalid configuration object. Webpack has been initialised using a configuration object that does not match the API schema.
- configuration.entry['index'] should be an non-empty array.
-> A non-empty array of non-empty strings
at webpack (/Users/hhimanshu/code/prsnl/ts/ts-react-components-lib/node_modules/webpack/lib/webpack.js:31:9)
at /Users/hhimanshu/code/prsnl/ts/ts-react-components-lib/node_modules/@size-limit/webpack/run-webpack.js:5:20
at new Promise (<anonymous>)
at runWebpack (/Users/hhimanshu/code/prsnl/ts/ts-react-components-lib/node_modules/@size-limit/webpack/run-webpack.js:4:10)
at Object.step40 (/Users/hhimanshu/code/prsnl/ts/ts-react-components-lib/node_modules/@size-limit/webpack/index.js:88:38)
at /Users/hhimanshu/code/prsnl/ts/ts-react-components-lib/node_modules/size-limit/calc.js:17:47
at Array.map (<anonymous>)
at step (/Users/hhimanshu/code/prsnl/ts/ts-react-components-lib/node_modules/size-limit/calc.js:16:29)
at calc (/Users/hhimanshu/code/prsnl/ts/ts-react-components-lib/node_modules/size-limit/calc.js:44:42)
at processTicksAndRejections (internal/process/task_queues.js:95:5)

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

Please checkout hhimanshu/update-deps branch from https://github.com/hhimanshu/ts-react-components-lib

Run yarn install

Run yarn size

What is the expected behavior?

The command should have ran successfully

Other relevant information:

The package.json is available at https://github.com/hhimanshu/ts-react-components-lib/blob/hhimanshu/update-deps/package.json

webpack version:

Node.js version

➜ ts-react-components-lib git:(hhimanshu/update-deps) ✗ node -v
v14.17.0
➜ ts-react-components-lib git:(hhimanshu/update-deps) npm -v
7.17.0
➜ ts-react-components-lib git:(hhimanshu/update-deps)

Operating System: Mac

Additional tools:

Issue 2:
🎉 Thanks for being brave and donating your valuable time to testing unfinished beta software 🎉

webpack 5 is in beta phase now. This means major changes and features are done. Major breaking changes have been added. Basic backward-compatibility has been added.

We want to use the beta phase to do the following:

Let a boarder range of users test the beta version.

Find bugs in new features.

Find regressions in old features.

Find places where a compat-layer can be added to avoid breaking changes.

Improve the migration guide and changelog.

We want to reach these goals after the beta phase:

Old features are very stable

New features are a bit stable

Backward-compatibility layer allows most existing plugins/loader to work unmodified (potentially with deprecation warnings)

There clear way how to migrate from webpack 4 to 5

There are experimental webpack 5 branches for higher-level tools (like angular-cli, vue-cli, create-react-app, ...) (at least 2)

To help with testing you can do the following:

Always test with the latest webpack beta version, as problems might already be fixed there

When using webpack directly:

Follow the migration guide

Report or add missing steps in the migration guide

Report problems during the migration

Report problems with the build after the migration

When using a higher-level tool:

Check if there is a branch/Pull Request for webpack 5

Follow guide there

Report problems in the Pull Request

Make sure to also report (positive) experience

Performance comparison

Size comparison

DX comparison

Try new features

Enable persistent caching -> guide

Enable Top Level Await

Enable the new asset module type

Enable Long Term Caching

Try to break filesystem watching

Trace back deprecation warnings with node --trace-deprecation

Help upgrading plugins/loaders

Make sure to follow beta releases

Retest newer version to avoid regressions in beta versions

Consider sponsoring webpack when this version

increases your productivity with better build performance

increases your productivity with better developer experience

increases your consumer happiness with better application performance

make you happy in some other way...

Known problems:

eval() causes problems with the optimization.innerGraph (production).

libraryTarget: "module" is not implemented yet

devtools don't support persistent caching yet

Persistent Cache file include absolute paths are are not portable yet

import.meta is still missing

prefetching doesn't work for WASM yet

CLI arguments doesn't contribute to cache version

stack trace is incorrectly displayed in stats

Build Time is a bit higher for non-cached builds. Possible reasons:

tracking extra information in the resolver for safe caching

mini-css-extract-plugin is not able to persistent cache yet

webpack-contrib/stylelint-webpack-plugin#187

svg-sprite-loader doesn't work

There is no warning for Buffer or process yet.

Planned breaking changes:

devtool options will be more restrictive

Internal HMR API for plugins will probably change

Disable some webpack-only syntax by default: require.ensure, require.include

terser-webpack-plugin will be upgraded

cache.store != "pack" will be removed