Vue 项目启动时报错:You may use special comments to disable some warnings.

Vue 项目,npm run dev 启动时报错:You may use special comments to disable some warnings.

Vue 项目启动时报错:You may use special comments to disable some warnings._第1张图片

解决此问题的方法:打开项目中**/build/webpack.base.conf.js 文件,找到如下代码,将其中的eslint 规则部分注释掉即可,再次启动就不会报错了。

const createLintingRule = () => ({
  test: /\.(js|vue)$/,
  loader: 'eslint-loader',
  enforce: 'pre',
  include: [resolve('src'), resolve('test')],
  options: {
    formatter: require('eslint-friendly-formatter'),
    emitWarning: !config.dev.showEslintErrorsInOverlay
  }
})

修改为:

const createLintingRule = () => ({
  // test: /\.(js|vue)$/,
  // loader: 'eslint-loader',
  // enforce: 'pre',
  // include: [resolve('src'), resolve('test')],
  // options: {
  //   formatter: require('eslint-friendly-formatter'),
  //   emitWarning: !config.dev.showEslintErrorsInOverlay
  // }
})

 

你可能感兴趣的:(【异常处理】,【工具与经验】,【前端开发】,vue,jscript,node.js,javascript)