TypeError: defineConfig is not a function
原因:由于用vue-cli直接创建了vue 3的项目,而里面的生态并非都是最新版,vue.config.js中的代码如下,使用了vue 3的语法:
const { defineConfig } = require('@vue/cli-service')
module.exports = defineConfig({
transpileDependencies: true
})
解决:输入 vue upgrade,一路向下,即可解决
本文来自博客园,作者:长情不羁的五年,转载请注明原文链接:https://www.cnblogs.com/grlend/p/17837746.html

浙公网安备 33010602011771号