如果你的人生没有|

死里学

园龄:4年5个月粉丝:7关注:6

TypeError: defineConfig is not a function

 

原因:由于用vue-cli直接创建了vue 3的项目,而里面的生态并非都是最新版,vue.config.js中的代码如下,使用了vue 3的语法:

1
2
3
4
const { defineConfig } = require('@vue/cli-service')
module.exports = defineConfig({
  transpileDependencies: true
})

  

 

 解决:输入 vue upgrade,一路向下,即可解决

posted @   死里学  阅读(2194)  评论(0编辑  收藏  举报
点击右上角即可分享
微信分享提示
评论
收藏
关注
推荐
深色
回顶
收起