解决报错error Component name “index“ should always be multi-word vue/multi-word-component-names

Vue3在编译的时候报错error Component name "index" should always be multi-word vue/multi-word-component-names

意思是“无法分配给文字报错错误组件名称“index”应始终为多单词vue/多单词组件名称”。官方文档建议组件名写成驼峰式或者-衔接的形式,故在编译的时候把命名不规范的代码判定不规格;

解决方法是关闭语法检查,在vue.config.js中增加下面配置

解决报错error Component name “index“ should always be multi-word vue/multi-word-component-names_第1张图片

 

const { defineConfig } = require('@vue/cli-service')
module.exports = defineConfig({
    transpileDependencies: true,
    lintOnSave:false
})

你可能感兴趣的:(Vue,vue.js,前端)