title: Webpack: SyntaxError: Unexpected token error when trying to access JSON array
body: <p>I am importing <code>.json</code> from <code>.js</code> file: <code>import pca from './pca.js'</code>. Using <code>console.log()</code> outputs correct <code>JSON</code> in the console, but when I am trying to access it in code </p>
  
  <pre><code>pca_json = JSON.parse(pca); (I can remove parsing, not working either) 
  pca_json["rowname"].forEach(... 
  </code></pre>
  
  <p>webpack fails with an error:</p>
  
  <p><a href="https://i.stack.imgur.com/VQuLK.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/VQuLK.png" alt="enter image description here"></a></p>
  
  <p>I tried changing extention: <code>.js -&gt; .json</code> but it fails to import the file at all in that case giving me another error:</p>
  
  <p><a href="https://i.stack.imgur.com/xC6mP.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/xC6mP.png" alt="enter image description here"></a></p>
  
  <p>The <code>pca.js</code> (or <code>pca.json</code>) looks like that:</p>
  
  <pre><code>var pca = {
      "rowname" : [
          "Ciliated_sensory_neurons",
          "Touch_receptor_neurons",
           ...
           ...
      ]
  }
  export default pca
  </code></pre>
  
  <p>I tried importing <code>pca.json</code> using <code>fs</code> module but it is not working either. I am getting the error: <a href="https://github.com/meteor/meteor/issues/7384" rel="nofollow noreferrer">https://github.com/meteor/meteor/issues/7384</a></p>
  
  <p>Any suggestions would be greatly appreciated.</p>