title: "fs is not defined" How can I use fs within a VueJS file
body: <p>I have been researching online and many others have ran in to similar problems that were left unresolved. </p>
  
  <p>Why is that I can't use fs in VueJS file, I have read that it cannot be called on the client side however it is used within the docs so what am I doing wrong?</p>
  
  <p><a href="https://socket.io/docs/client-api/#With-a-self-signed-certificate" rel="nofollow noreferrer">https://socket.io/docs/client-api/#With-a-self-signed-certificate</a></p>
  
  <p>socket.js file:</p>
  
  <pre><code>
  const fs = require('fs');
  
  var https = require('https').createServer(app, {
    key: fs.readFileSync('server-key.pem'),
    cert: fs.readFileSync('server-cert.pem'),
    passphrase: ''
  });
  
  </code></pre>
  
  <p>chat.js file:</p>
  
  <pre><code>import io from 'socket.io-client';
  
  const socket = io('my_public_ip:port', {
    ca: fs.readFileSync('server-cert.pem'),  //unable to read fs here
  });
  </code></pre>