vue.jswebpacknuxt.jswebpack-hot-middleware

Turn off webpack-hot-middleware client overlay in Nuxt application


I'm trying to turn off the overlay from webpack-hot-middleware in my Nuxt application.

I tried editing the config in nuxt.config.js but the overlay persists.

  build: {
    // turn off client overlay when errors are present
    hotMiddleware: {
      overlay: false
    },
    /*
    ** You can extend webpack config here
    */
    extend(config, ctx) {
      // Run ESLint on save
      if (ctx.isDev && ctx.isClient) {
        config.module.rules.push({
          enforce: 'pre',
          test: /\.(js|vue)$/,
          loader: 'eslint-loader',
          exclude: /(node_modules)/
        });
      }
    }
  }

Solution

  • If you look at this PR, then you need to do this:

      build: {
        hotMiddleware: {
          client: {
            // turn off client overlay when errors are present
            overlay: false
          }
        }
      }
    

    It works for me (Nuxt 2.8.1).