title: Webpack 5: Prevent duplication: Entry dependencies & SplitChunksPlugin
body: <p>With Webpack, there is the possibility to avoid <strong>duplicated code</strong>. This feature exists since a long time with <code>SplitChunksPlugin</code> or even before <code>CommonsChunkPlugin</code> (deprecated).</p>
  <p>Looking at the Webpack 5 documentation in the <a href="https://webpack.js.org/guides/code-splitting/#prevent-duplication" rel="nofollow noreferrer">prevent duplication section</a>, a new option called <a href="https://webpack.js.org/guides/code-splitting/#entry-dependencies" rel="nofollow noreferrer"><code>dependOn</code></a> has been added. This option allows to share the modules between the chunks.</p>
  <p>However, there is still the option <code>splitChunksPlugin</code> and I would like to know what is the difference between both?</p>