在Nuxt应用程序中关闭webpack-hot-middleware客户端覆盖层

3

我正在尝试关闭Webpack热重载中间件在我的Nuxt应用程序中的覆盖层。

我尝试编辑nuxt.config.js中的配置,但覆盖层仍然存在。

  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)/
        });
      }
    }
  }
1个回答

7
如果您查看这个 PR,那么您需要执行以下操作:
  build: {
    hotMiddleware: {
      client: {
        // turn off client overlay when errors are present
        overlay: false
      }
    }
  }

这对我来说很有效(Nuxt 2.8.1)。


好的 - 就这样了。谢谢! - Enaud

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接