title: webpack-cli [Error: EROFS: read-only file system, mkdir '/resource']
body: <p>I want to copy the static file in webpack 5.x, so I install the webpack copy plugin <code>    &quot;copy-webpack-plugin&quot;: &quot;^10.2.1&quot;,</code> and added config like this:</p>
  <pre><code>new CopyPlugin({
        patterns: [
          { from: &quot;src/manifest.json&quot;, to: &quot;manifest.json&quot; },
          { from: &quot;src/resource/image&quot;, to: &quot;/resource/image&quot; },
        ],
      }),
  </code></pre>
  <p>what I am trying to do is copy the image folder from source folder to dist folder and keep the folder structure. But when I run the webpack command and shows error like this:</p>
  <pre><code>➜  reddwaf-translate-plugin git:(main) ✗ npm run dev
  
  &gt; reddwaf-translate-plugin@1.0.0 dev
  &gt; rm -rf src/bundle &amp;&amp; webpack --mode development --config src/resource/config/webpack.dev.config.js
  
  [webpack-cli] [Error: EROFS: read-only file system, mkdir '/resource'] {
    errno: -30,
    code: 'EROFS',
    syscall: 'mkdir',
    path: '/resource'
  }
  </code></pre>
  <p>I am sure the filesystem is not read only because I have created files and folder. why did this happen? what should I do to fix it? The current operation system is macOS Monteney with M1 pro chip.</p>