I have two files, one is my main js file called app.js
and I have a file where I store all my js functions, called functions.js
. As you can see on the image below.
But I want to include the functions.js
file into the app.js
file. So I googled on how to do it and this is what people said:
But my npm run dev says the file doesn't exist. But the path is correct. What am I doing wrong here, is there a other way to do it?
You can simply just create the file wherever you want to create it, and then export some properties or methods, and then import them in your
app.js file
, or in whatever file you need. Something like this ://new_file.js
And in your app.js file :