title: Use node.js fs with Webpack
body: <p>I'm doing the following in a js file</p>
  
  <pre><code>    var FS = require('fs');
      var TestGoogle = eval(FS.readFileSync('../loader.js', 'utf8'));
  </code></pre>
  
  <p>I added to my webpack config:</p>
  
  <pre><code>node: {
    fs: "empty"
  }
  </code></pre>
  
  <p>The webpack compiles with Babel but I get an error in the js console</p>
  
  <pre><code>FS.readFileSync is not a function
  </code></pre>
  
  <p>Why is this? I would simply like to import a javascript file. Specifically in order to use material bar charts of google. <a href="https://developers.google.com/chart/interactive/docs/gallery/barchart#creating-material-bar-charts" rel="nofollow">https://developers.google.com/chart/interactive/docs/gallery/barchart#creating-material-bar-charts</a></p>
  
  <p>In vanilla js, I need to</p>
  
  <pre><code>&lt;script type="text/javascript" src="https://www.gstatic.com/charts/loader.js"&gt;&lt;/script&gt;
  &lt;script type="text/javascript"&gt;
    google.charts.load('current', {'packages':['bar']});
  </code></pre>
  
  <p>And then, as the tutorial states, use google.charts.Bar instead of google.visualization.BarChart. Unfortunately, I can't get this simple vanilla JS to play nicely with Node.js, Babel, Webpack.</p>