Static GitHub Issues

[2595] How to push node setup to webpack config?

prev: How to add nuxt to an already existing project?
next: screen jumps to top before page change

So, I'm trying to do this, but got undefind's all the time:

extend (config, ctx) {
  if (ctx.dev && ctx.isClient) {
    config.module.rules.push(
      {
        enforce: 'pre',
        test: /\.(js|vue)$/,
        loader: 'eslint-loader',
        exclude: /(node_modules)/
      },
      {
        test: /\.json$/,
        loader: 'json-loader'
      }
    )
    config.node.push({
      console: 'empty',
      fs: 'empty',
      net: 'empty',
      tls: 'empty'
    })
  }
}

What is wrong? @Atinux @alexchopin @pi0

<!--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/c2259">#c2259</a>)</em></sub></div>