I need to use in function from javascript file in vue.js project,
I tried to add javascript file to script in component in my vue.js project and to get access to function but I did not succeed to add my javascript file in correct.
I need to use in function from javascript file in vue.js project,
I tried to add javascript file to script in component in my vue.js project and to get access to function but I did not succeed to add my javascript file in correct.
You can add the javascript
file then export
you function from that file
export const test = ()=> {
console.log("foo")
}
then in your vue component you can just import your function
import {test} from "./path/your-file-name"