Laravel+Vue3+Vite项目dev环境ant-design-vue reactive函数报错求助
Laravel+Vue3+Vite项目dev环境下ant-design-vue IconBase.js调用reactive报错:isObject is not a function
我正在开发一个基于Laravel、Vue 3和Vite的项目,目前遇到一个奇怪的问题:
- 执行
npm run build后项目运行完全正常,但执行npm run dev时,ant-design-vue包的IconBase.js文件中调用Vue的reactive函数会抛出异常。 - 出错的代码行:
var twoToneColorPalette = reactive({ primaryColor: '#333', secondaryColor: '#E6E6E6', calculated: false }); - 具体错误栈:
reactivity.esm-bundler.js:927 Uncaught TypeError: isObject is not a function at createReactiveObject (reactivity.esm-bundler.js:927:8) at reactive (reactivity.esm-bundler.js:891:10) at IconBase.js:13:27
已经尝试了多种常规排查方法(比如清理node_modules和lock文件重新安装、检查Vue与ant-design-vue的版本兼容性、确认Vite配置项),但都没能解决问题,恳请各位开发者提供可行的解决方案。
内容的提问来源于stack exchange,提问作者essaber yahya
相关产品推荐
相关产品推荐

