title: Dirname in Nuxt
body: <p>I am trying to read files in a directory but cannot because __dirname is undefined</p>
  
  <p>nuxt.config.js</p>
  
  <pre class="lang-js prettyprint-override"><code>export default {
    router: {
      middleware: ['database']
    },
    build: {
      extend: function (config, __ctx) {
        config.node = {
          fs: "empty",
          module: "empty",
          net: "empty",
        };
      },
    },
  }
  </code></pre>
  
  <p>What can be done to determine __dirname?</p>