title: Resolve Webpack 5.9.0 deprecation calls [DEP_WEBPACK_DEPRECATION_ARRAY_TO_SET] and [DEP_WEBPACK_CHUNK_MODULES_ITERABLE]
body: <p>I have a couple webpack 5.9 build warnings which are giving me some difficulty in resolving.</p>
  <p>I have researched as best I could online to no avail. I did find this:</p>
  <p><a href="https://webpack.js.org/blog/2020-10-10-webpack-5-release/#arrays-to-sets" rel="nofollow noreferrer">Webpack 5 release docs: Arrays to Sets</a></p>
  <p>However, except that I understand the concepts, I have no idea how to change my config settings to resolve this. Same is true for how to switch up things to &quot;Use new ChunkGraph API&quot;.</p>
  <p>Any assistance is appreciated.</p>
  <pre><code>yarn run build
  </code></pre>
  <p>(node:90180) [DEP_WEBPACK_DEPRECATION_ARRAY_TO_SET] DeprecationWarning: chunk.files was changed from Array to Set (using Array method 'includes' is deprecated)
  (Use <code>node --trace-deprecation ...</code> to show where the warning was created)
  (node:90180) [DEP_WEBPACK_CHUNK_MODULES_ITERABLE] DeprecationWarning: Chunk.modulesIterable: Use new ChunkGraph API</p>
  <p>Update:</p>
  <p>I have discovered through using:</p>
  <pre><code>node --trace-deprecation node_modules/webpack/bin/webpack.js --mode=development
  </code></pre>
  <p>that both of these deprecation warnings occur only when using purge-css-webpack-plugin. I am using it like so (which I learned from following: <a href="https://survivejs.com/webpack/styling/eliminating-unused-css/" rel="nofollow noreferrer">https://survivejs.com/webpack/styling/eliminating-unused-css/</a>):</p>
  <pre><code>      new PurgeCSSWebpackPlugin({
          // paths: ALL_FILES,
          paths: purgePath,
          extractors: [
              {
                extractor: (content) =&gt;
                  content.match(/[^&lt;&gt;&quot;'`\s]*[^&lt;&gt;&quot;'`\s:]/g) || [],
                extensions: [&quot;html&quot;],
              },
          ],          
      }),
  </code></pre>
  <p>Still not sure how to resolve the warnings, but at least getting closer. Also, pondering other options to remove unused CSS....</p>
  <p>Latest Update</p>
  <p>For @Ashish and others who my read this: I did resolve this. However, I must apologize for not updating this topic when I did b/c now I can't remember how I did it. I believe I updated some packages in my package.json to latest. Also, I currently use purge css webpack plugin like so:</p>
  <pre><code>`new PurgeCSSWebpackPlugin({
      paths: globAll.sync(
        [
          `${path.resolve(__dirname, './src')}/**/*`,
          `${path.resolve(__dirname, './public')}/**/*`
        ],  
        { nodir: true }
     ),
   }),`
  </code></pre>