vue-cli 4.x 未解之谜

全局安装vue@cli  已经是4.x的版本,做项目随手一个eslient,凉凉送给自己

目前我还没有找到如何关闭vue-cli语法检测

所以只能卸载4.x,安装3.x版本

卸载4.x

npm uninstall @vue/cli -g

安装3.x

npm i  @vue/[email protected] -g

此时在eslintrc.js中关掉语法检测

module.exports = {
    root: true,
    env: {
        node: true
    },
    'extends': [
        'plugin:vue/essential',
        // '@vue/standard'
    ],
    rules: {
        // 'no-console': process.env.NODE_ENV === 'production' ? 'error' : 'off',
        // 'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off',
        // 'space-before-function-paren': 0

    },
    parserOptions: {
        parser: 'babel-eslint'
    }
}

项目可以跑起来了

vue ui 控制面板也没有报错了

发布了142 篇原创文章 · 获赞 77 · 访问量 14万+

猜你喜欢

转载自blog.csdn.net/qq_38845858/article/details/103605205