title: Can't import modules(like axios) and json while require can
body: <p>I have a simple project like this and have already install axios:
  <a href="https://i.stack.imgur.com/chhDV.png" rel="nofollow noreferrer">The project</a></p>
  
  <p>In main.js,I tried to import the axios and a json file but throw error:</p>
  
  <pre class="lang-js prettyprint-override"><code>import axios from 'axios' //SyntaxError: Cannot use import statement outside a module
  import Test_data from 'json/test.json' //SyntaxError: Cannot use import statement outside a module
  </code></pre>
  
  <p>If I use require() it will success,could anybody tell me why?</p>
  
  <pre class="lang-js prettyprint-override"><code>var axios=require('axios');//success
  var Test_data=require('./json/test.json');//success
  
  console.log(Test_data);//success
  </code></pre>