title: Require vs. import
body: <p>Code runs without errors when I <code>require</code> compared to when I <code>import</code>, then I receive an error: 
  <a href="https://i.stack.imgur.com/KbsKS.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/KbsKS.png" alt="va"></a></p>
  
  <p>app.js:</p>
  
  <pre><code>// require("@babel/polyfill");
  // require("@babel/core");
  import babel from '@babel/core';
  import babelpoly from '@babel/polyfill';
  import axios from 'axios';
  
  const BASE_URL = 'https://jsonplaceholder.typicode.com';
  
  const getTodos = async () =&gt; {
    try {
      const res = await axios.get(`${BASE_URL}/todos`);
  
      const todos = res.data;
  
      console.log(`GET: Here's the list of todos`, todos);
  
      return todos;
    } catch (e) {
      console.error(e);
    }
  };
  </code></pre>
  
  <p>Based on what I understand, <code>require</code> and <code>import</code> have the same functionality but they have performance trade offs. I must be wrong, otherwise it would've worked both ways</p>