How can one use a function imported from another script in a vue component?

If you are developing multiple components in Vue, you might be facing the situation that you have the following folder structure: . โ””โ”€โ”€ src/ โ””โ”€โ”€ components/ โ”œโ”€โ”€ utils/ โ”‚ โ””โ”€โ”€ some_cool_functions.js โ”œโ”€โ”€ component_a.vue โ””โ”€โ”€ component_b.vue $ cat some_cool_functions.js export function function_b(id) { console.log("Do some stuff in function a " + id) } export function function_b(id) { console.log("Do some stuff in function b " + id) } <template> <div> .... <v-btn @click="function_a(item....

November 30, 2023 ยท 1 min ยท Moritz Gnisia