簡體   English   中英

在Nuxt應用程序中關閉webpack-hot-middleware客戶端覆蓋

[英]Turn off webpack-hot-middleware client overlay in Nuxt application

我正在嘗試在Nuxt應用程序中關閉webpack-hot-middleware的覆蓋。

我嘗試在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)/
        });
      }
    }
  }

如果您查看此PR ,則需要執行以下操作:

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

它對我有用(Nuxt 2.8.1)。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM