Static GitHub Issues

[743] broken require server side

prev: Layout inheritance
next: Loading chunk {n} failed

I need to use a node module recaptcha2 server side only, which depends in fs. How to reproduce the bug: 1. clone vue init nuxt/express test-nuxt-express 2. npm install --save recaptcha2 3. add this code to pages/index.vue

if (process.server) {
  const recaptcha2 = require('recaptcha2')
}

Now a dependency is not found:

This dependency was not found:

* fs in ./~/request/lib/har.js

I think there is some issue with webpack server side

<!--cmty--><!--cmty_prevent_hook--><div align="right"><sub><em>This question is available on <a href="https://nuxtjs.cmty.io">Nuxt.js</a> community (<a href="https://nuxtjs.cmty.io/nuxt/nuxt.js/issues/c637">#c637</a>)</em></sub></div>