title: Cannot use import.meta outside a module. Vite testing
body: <p>I'm using vite and jest for testing. When i run my tests i get this <a href="https://i.stack.imgur.com/8uEIJ.png" rel="noreferrer">error</a></p>
  <p>This is my .babelrc file <a href="https://i.stack.imgur.com/RMxZz.png" rel="noreferrer">babelrc</a></p>
  <p>and this my vite.config <a href="https://i.stack.imgur.com/VK4xu.png" rel="noreferrer">vite config</a></p>
  <p>Does anyone have a solution for this? I've searched and didn't find any answer</p>
  <p><strong>FIX:</strong>
  I added this on babel.config.js</p>
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>//babel.config.js
  
  module.exports = {
    presets: [
      [
        '@babel/preset-env',
        { useBuiltIns: 'entry', corejs: '2', targets: { node: 'current' } },
      ],
    ],
    plugins: [
      function () {
        return {
          visitor: {
            MetaProperty(path) {
              path.replaceWithSourceString('process')
            },
          },
        }
      },
    ],
  }</code></pre>
  </div>
  </div>
  </p>