I have created frontend application with Vue Js. I want to integrate one native javascript file into the Vue component.
The native js file contains multiple util functions. I want to call those functions from my Vue component.
Native js file util.js
var helper = function(t) {
var u = 'product',
A = 'version',
return {
buildHelpUrl: function(a, b, c) {
return "http://"
}
/* Snippets */
}
I tried following way to import in my native js file into .vue file
Case 1: import OTHHUrlBuilder from '@/util.js';
Case 2: import * as urlbulider from '@/util.js';
Nothing worked. Please help me to properly import and use the functions available in the native js files.