vue cli3由于存在缓存,所以会导致只会在首次npm run serve时报eslint的错误,在之后重启就不再有eslint的错误提示。

解决方案:

在serve命名中再加一句清除缓存的命令 (&&前的那句,后面那句是具体项目的运行脚本)

"serve": "rimraf -rf ./node_modules/.cache/vue-loader && cross-env NODE_ENV=development env_config=dev vue-cli-service serve"

这样就可以每次npm run serve控制台都能显示eslint的报错了

相关文章:

  • 2021-08-06
  • 2018-12-16
  • 2020-10-26
  • 2019-09-17
  • 2020-03-13
  • 2019-10-29
  • 2019-08-26
  • 2018-08-27
猜你喜欢
  • 2020-05-27
  • 2018-08-28
  • 2017-12-19
  • 2019-06-26
  • 2019-12-17
  • 2020-04-17
  • 2019-10-28
  • 2021-09-25
相关资源
相似解决方案