Answer the question
In order to leave comments, you need to log in
The path to the js file does not work, what should I do?
The problem is that I don’t write any paths to js files, they don’t work for some reason. (Spanish Gulp) I insert the contents of js files into the script tag and everything works, I also created a separate folder without gulp, everything works fine there.
Answer the question
In order to leave comments, you need to log in
You should show how you build. And so my assumption is that your HTML is not processed in any way and goes into the build as it is. If you just open the HTML file, everything will connect, since the URL will be file://{PATH_TO_HTML_FILE }. But if you use some kind of web server, then you cannot go beyond the root path. You should change the path to /js/script.js and copy the js folder to the build folder.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question