Recently, I have been working on a JavaScript script that resembles traditional syntax without the use of Vue.js. Surprisingly, I chose not to include semicolons in my code (not entirely sure why, just felt like mentioning it).
Now, I'm pondering whether I should restructure this script into an object format with multiple methods and data/variables as properties, similar to how it is typically done at the end of a vue.js page.
Although I am familiar with JavaScript, I am completely new to Vue.js.
If I have a script named myscript.js
, and I wish to incorporate this file along with its functions and variables into a .vue
file (excluding the main.js file to avoid loading it on every page except the one I'm currently editing), what would be the best approach for including it?
I apologize for the vagueness of my explanation as I am too exhausted to provide a more detailed clarification at the moment.
Any guidance or advice on this matter would be highly appreciated!
Thank you!