在运行npm run serve时,出现报错:
'''plaintext defineConfig is not a function '''
原因:由于用vue-cli直接创建了vue 3的项目,而里面的生态并非都是最新版,vue.config.js中的代码如下,使用了vue 3的语法。 vue.config.js中的代码如下:
'''js module.exports = defineConfig({ transpileDependencies: true }) '''
输入命令 vue upgrade,一直yes,即可解决