title: Web3 formatter.js loading issue
body: <p>I am trying to create a small ethereum blockchain application with NextJS.</p>
  <p>Import Web3 is causing some issue</p>
  <pre><code>ModuleParseError: Module parse failed: C:\Path\node_modules\web3-core-helpers\lib\formatters.js Unexpected token (296:20)
  You may need an appropriate loader to handle this file type.
  |     // If options !== undefined, don't blow out existing data
  |     if (options.fromBlock === undefined)
  |         options = { ...options, fromBlock: 'latest' };
  |     if (options.fromBlock || options.fromBlock === 0)
  |         options.fromBlock = inputBlockNumberFormatter(options.fromBlock);
      at C:\Path\node_modules\webpack\lib\NormalModule.js:303:19
      at C:\Path\node_modules\webpack\lib\NormalModule.js:209:11
      at C:\Path\node_modules\loader-runner\lib\LoaderRunner.js:373:3
      at iterateNormalLoaders (C:\Path\node_modules\loader-runner\lib\LoaderRunner.js:214:10)
      at C:\Path\node_modules\loader-runner\lib\LoaderRunner.js:205:4
      at C:\Path\node_modules\enhanced-resolve\lib\CachedInputFileSystem.js:70:14
      at processTicksAndRejections (internal/process/task_queues.js:75:11)
  </code></pre>
  <p>The <code>import Web3 from &quot;web3&quot;;</code> is the root cause</p>
  <pre><code>import Web3 from &quot;web3&quot;;
  
  const web3 = new Web3(window.ethereum);
  
  export default web3;
  </code></pre>
  <p>Here is my package.json</p>
  <pre><code>{
    &quot;name&quot;: &quot;myproject&quot;,
    &quot;version&quot;: &quot;1.0.0&quot;,
    &quot;description&quot;: &quot;&quot;,
    &quot;main&quot;: &quot;index.js&quot;,
    &quot;scripts&quot;: {
      &quot;test&quot;: &quot;mocha&quot;,
      &quot;dev&quot;: &quot;next dev&quot;
    },
    &quot;author&quot;: &quot;&quot;,
    &quot;license&quot;: &quot;ISC&quot;,
    &quot;dependencies&quot;: {
      &quot;@truffle/hdwallet-provider&quot;: &quot;^1.2.2&quot;,
      &quot;fs-extra&quot;: &quot;^9.1.0&quot;,
      &quot;ganache-cli&quot;: &quot;^6.12.2&quot;,
      &quot;mocha&quot;: &quot;^8.3.0&quot;,
      &quot;next&quot;: &quot;^4.1.4&quot;,
      &quot;react&quot;: &quot;^16.14.0&quot;,
      &quot;react-dom&quot;: &quot;^16.14.0&quot;,
      &quot;solc&quot;: &quot;^0.4.17&quot;,
      &quot;web3&quot;: &quot;^1.3.4&quot;
    }
  }
  </code></pre>
  <p>Do I need other module ?
  I noticed that the same import is working when creating the app with npx create-next-app but I want to use specific version so I only used <code>npm install --save next@4.1.4 react@16 react-dom@16</code> inside my node project.</p>