<h1 dir="auto">Bug report</h1>




<p dir="auto"><strong>What is the current behavior?</strong><br>
The <code class="notranslate">npx size-limit</code> command fails with the following error</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="➜  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.
   -&gt; 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 (&lt;anonymous&gt;)
    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 (&lt;anonymous&gt;)
    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)
"><pre class="notranslate"><code class="notranslate">➜  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.
   -&gt; 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 (&lt;anonymous&gt;)
    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 (&lt;anonymous&gt;)
    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)

</code></pre></div>
<p dir="auto"><strong>If the current behavior is a bug, please provide the steps to reproduce.</strong></p>
<ul dir="auto">
<li>Please checkout <code class="notranslate">hhimanshu/update-deps</code> branch from <a href="https://github.com/hhimanshu/ts-react-components-lib">https://github.com/hhimanshu/ts-react-components-lib</a></li>
<li>Run <code class="notranslate">yarn install</code></li>
<li>Run <code class="notranslate">yarn size</code></li>
</ul>
<p dir="auto"><strong>What is the expected behavior?</strong><br>
The command should have ran successfully</p>


<p dir="auto"><strong>Other relevant information:</strong><br>
The <code class="notranslate">package.json</code> is available at <a href="https://github.com/hhimanshu/ts-react-components-lib/blob/hhimanshu/update-deps/package.json">https://github.com/hhimanshu/ts-react-components-lib/blob/hhimanshu/update-deps/package.json</a></p>
<p dir="auto">webpack version:<br>
Node.js version</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="➜  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)"><pre class="notranslate"><code class="notranslate">➜  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)
</code></pre></div>
<p dir="auto">Operating System: Mac<br>
Additional tools:</p>
<p dir="auto">🎉 Thanks for being brave and donating your valuable time to testing unfinished beta software 🎉</p>
<p dir="auto">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.</p>
<p dir="auto">We want to use the beta phase to do the following:</p>
<ul dir="auto">
<li>Let a boarder range of users test the beta version.</li>
<li>Find bugs in new features.</li>
<li>Find regressions in old features.</li>
<li>Find places where a compat-layer can be added to avoid breaking changes.</li>
<li>Improve the <a href="https://github.com/webpack/changelog-v5/blob/master/MIGRATION%20GUIDE.md">migration guide</a> and <a href="https://github.com/webpack/changelog-v5/blob/master/README.md">changelog</a>.</li>
</ul>
<p dir="auto">We want to reach these goals after the beta phase:</p>
<ul dir="auto">
<li>Old features are very stable</li>
<li>New features are a bit stable</li>
<li>Backward-compatibility layer allows most existing plugins/loader to work unmodified (potentially with deprecation warnings)</li>
<li>There clear way how to migrate from webpack 4 to 5</li>
<li>There are experimental webpack 5 branches for higher-level tools (like angular-cli, vue-cli, create-react-app, ...) (at least 2)</li>
</ul>
<p dir="auto">To help with testing you can do the following:</p>
<ul dir="auto">
<li>Always test with the latest webpack beta version, as problems might already be fixed there</li>
<li>When using webpack directly:
<ul dir="auto">
<li>Follow the <a href="https://github.com/webpack/changelog-v5/blob/master/MIGRATION%20GUIDE.md">migration guide</a></li>
<li>Report or add missing steps in the migration guide</li>
<li>Report problems during the migration</li>
<li>Report problems with the build after the migration</li>
</ul>
</li>
<li>When using a higher-level tool:
<ul dir="auto">
<li>Check if there is a branch/Pull Request for webpack 5</li>
<li>Follow guide there</li>
<li>Report problems in the Pull Request</li>
</ul>
</li>
<li>Make sure to also report (positive) experience
<ul dir="auto">
<li>Performance comparison</li>
<li>Size comparison</li>
<li>DX comparison</li>
</ul>
</li>
<li>Try new features
<ul dir="auto">
<li>Enable persistent caching -&gt; <a href="https://github.com/webpack/changelog-v5/blob/master/guides/persistent-caching.md">guide</a></li>
<li>Enable Top Level Await</li>
<li>Enable the new <code class="notranslate">asset</code> module type</li>
<li>Enable Long Term Caching</li>
<li>Try to break filesystem watching</li>
</ul>
</li>
<li>Trace back deprecation warnings with <code class="notranslate">node --trace-deprecation</code>
<ul dir="auto">
<li>Help upgrading plugins/loaders</li>
</ul>
</li>
<li>Make sure to follow beta releases
<ul dir="auto">
<li>Retest newer version to avoid regressions in beta versions</li>
</ul>
</li>
<li>Consider sponsoring webpack when this version
<ul dir="auto">
<li>increases your productivity with better build performance</li>
<li>increases your productivity with better developer experience</li>
<li>increases your consumer happiness with better application performance</li>
<li>make you happy in some other way...</li>
</ul>
</li>
</ul>
<p dir="auto">Known problems:</p>
<ul dir="auto">
<li><code class="notranslate">eval()</code> causes problems with the <code class="notranslate">optimization.innerGraph</code> (production).</li>
<li><code class="notranslate">libraryTarget: "module"</code> is not implemented yet</li>
<li><code class="notranslate">devtool</code>s don't support persistent caching yet</li>
<li>Persistent Cache file include absolute paths are are not portable yet</li>
<li><code class="notranslate">import.meta</code> is still missing</li>
<li>prefetching doesn't work for WASM yet</li>
<li>CLI arguments doesn't contribute to cache version</li>
<li><del><a href="https://github.com/webpack/webpack/issues/9802#issuecomment-541209889" data-hovercard-type="issue" data-hovercard-url="/webpack/webpack/issues/9802/hovercard">stack trace is incorrectly displayed in stats</a></del></li>
<li>Build Time is a bit higher for non-cached builds. Possible reasons:
<ul dir="auto">
<li>tracking extra information in the resolver for safe caching</li>
</ul>
</li>
<li><a href="https://github.com/webpack/webpack/issues/9802#issuecomment-541303173" data-hovercard-type="issue" data-hovercard-url="/webpack/webpack/issues/9802/hovercard">mini-css-extract-plugin is not able to persistent cache yet</a></li>
<li><a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="506047258" data-permission-text="Title is private" data-url="https://github.com/webpack-contrib/stylelint-webpack-plugin/issues/187" data-hovercard-type="issue" data-hovercard-url="/webpack-contrib/stylelint-webpack-plugin/issues/187/hovercard" href="https://github.com/webpack-contrib/stylelint-webpack-plugin/issues/187">webpack-contrib/stylelint-webpack-plugin#187</a></li>
<li><a href="https://github.com/webpack/webpack/issues/9802#issuecomment-541468003" data-hovercard-type="issue" data-hovercard-url="/webpack/webpack/issues/9802/hovercard">svg-sprite-loader doesn't work</a></li>
<li>There is no warning for Buffer or process yet.</li>
</ul>
<p dir="auto">Planned breaking changes:</p>
<ul dir="auto">
<li><del>devtool options will be more restrictive</del></li>
<li>Internal HMR API for plugins will probably change</li>
<li><del>Disable some webpack-only syntax by default: <code class="notranslate">require.ensure</code>, <code class="notranslate">require.include</code></del></li>
<li>terser-webpack-plugin will be upgraded</li>
<li><del>cache.store != "pack" will be removed</del></li>
</ul>