title: How can I use ES6 in vue.config.js?
body: <pre><code>import routes from &quot;./src/router/routes&quot;;
  
  module.exports = {
   // routes
  }
  </code></pre>
  <p>can not use es6 module here, it gives an error:</p>
  <pre><code>import routes from &quot;./src/router/routes&quot;;
         ^^^^^^
  
  SyntaxError: Unexpected identifier
  </code></pre>
  <p>also require does not work, as routes are ES6 modules (have import statements)</p>
  <pre><code>const routes = require(&quot;./src/router/routes&quot;);
  </code></pre>