Answer the question
In order to leave comments, you need to log in
How to properly compile vue component with vuex?
Good afternoon.
There is a ready-made chat component that should be embedded into the application, as a library https://cli.vuejs.org/guide/build-targets.html#library .
1) I compile the component "vue-cli-service build --target lib --name chat ./src/components/Chat.vue;
2) I move chat.umd.js into the application in the @/modules/chat_module directory
3) On startup the project throws an error in the browser TypeError: Object(...) is not a function
The module itself is written in vue3, the project uses vue2.The component also uses vuex and typescript.The entry point is specified as
./src/components/Chat.vue.Who Has anyone experienced this and how would you solve this problem?
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question