Home

Issue: 743

broken require server side

[issue link]

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

This question is available on Nuxt.js community (#c637)