1. 程式人生 > >VUE vue——解決“You may use special comments to disable some warnings. Use // eslint-disable-next-line to ignore the next line. Use /* eslint-disable */ t

VUE vue——解決“You may use special comments to disable some warnings. Use // eslint-disable-next-line to ignore the next line. Use /* eslint-disable */ t

vue——解決“You may use special comments to disable some warnings. Use // eslint-disable-next-line to ignore the next line. Use /* eslint-disable */ to ignore all warnings in a file. ”

 

在build/webpack.base.conf.js檔案中,註釋或者刪除掉:module->rules中有關eslint的規則

複製程式碼
module: {
  rules: [
    //...(config.dev.useEslint ? [createLintingRule()] : []), // 註釋或者刪除
    {
      test: /\.vue$/,
      loader: 'vue-loader',
      options: vueLoaderConfig
    },
    ...
    }
  ]
}
複製程式碼

然後 nmp run dev 就能正常運行了

在build/webpack.base.conf.js檔案中,註釋或者刪除掉:module->rules中有關eslint的規則

複製程式碼
module: {
  rules: [
    //...(config.dev.useEslint ? [createLintingRule()] : []), // 註釋或者刪除
    {
      test: /\.vue$/,
      loader: 'vue-loader',
      options: vueLoaderConfig
    },
    ...
    }
  ]
}
複製程式碼

然後 nmp run dev 就能正常運行了