vueComponent / ant-design-vue

🌈 An enterprise-class UI components based on Ant Design and Vue. 🐜
https://antdv.com/
Other
20.13k stars 3.78k forks source link

i am working on a project using Laravel / vuejs vite and i have a problem in IconBase.js in ant-design-vue package and exactly on : #7603

Closed essaberYahya closed 1 month ago

essaberYahya commented 4 months ago

Version

4.2.1

Environment

laravel vuejs vite

Reproduction link

Edit on CodeSandbox

Steps to reproduce

i am working on a project using Laravel / vuejs vite and i have a problem in IconBase.js in ant-design-vue package and exactly on :

var twoToneColorPalette = reactive({ primaryColor: '#333', secondaryColor: '#E6E6E6', calculated: false });

when this code call reactive function "Default vuejs function" , it's return this exception:

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 Keep in mind that when i run npm run build the app working fine but when i run npm run dev it's generate this error . Any help please !!

Evreything without result

What is expected?

Expectation is to work without any problem in production and devlopement

What is actually happening?

i am working on a project using Laravel / vuejs vite and i have a problem in IconBase.js in ant-design-vue package and exactly on :

var twoToneColorPalette = reactive({ primaryColor: '#333', secondaryColor: '#E6E6E6', calculated: false });

when this code call reactive function "Default vuejs function" , it's return this exception:

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 Keep in mind that when i run npm run build the app working fine but when i run npm run dev it's generate this error . Any help please !!

Evreything without result

cc-hearts commented 4 months ago

Could you share a reproducible example of the code?

essaberYahya commented 4 months ago

There's no reproducible example of the code? because when i run npm run dev by vite script and the app try to import the ant-design-vue and especially iconbase.js file, it's generate this error :

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

so basically it's during ant-design-vue importation .

vivian520121 commented 3 months ago

Have you solved it? I also encountered the same problem

essaberYahya commented 3 months ago

Have you solved it? I also encountered the same problem

Unfortunately no, i am still trying .

vivian520121 commented 3 months ago

I found the problem because I imported a plugin @kangc/v-md-editor, maybe it's because of plugin conflicts

github-actions[bot] commented 1 month ago

This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 7 days

mengdongl commented 1 month ago

I had the same problem,in my case, I changed ant-design-vue to import after vue import, and it worked. import { createApp } from 'vue'; import Antd from 'ant-design-vue';