So basically my backend calls the index.html when I open my localhost in the browser. To test it, I added a simple h1 test before the div id="app" and I can see that. But I get an error saying 'failed to load resource' main.js. I double-checked again, in all javascript files I have the exact same code as you.
Does it give you error 499? You might try adding crossorigin to the HTML element. You should be able to see this in the article where I add in the main.js import to index.html
Which browser are you using?
Do you have script type="module"?
Are the two files in the same part of the directory?
Thank you for using this methodology. I would like to help you solve this problem. When we do, I can add the solution to the original post.
I tried it with both Chrome and firefox. I did add type=module in the script tag. And yes, index.html and main.js are part of the same directory.
I will share my code on github with you. Maybe we will be able to find the reason for the error together and see whether it is an error that occurs more often in that context...
So basically my backend calls the index.html when I open my localhost in the browser. To test it, I added a simple h1 test before the div id="app" and I can see that. But I get an error saying 'failed to load resource' main.js. I double-checked again, in all javascript files I have the exact same code as you.
Does it give you error 499? You might try adding crossorigin to the HTML element. You should be able to see this in the article where I add in the main.js import to index.html
Which browser are you using?
Do you have script type="module"?
Are the two files in the same part of the directory?
Thank you for using this methodology. I would like to help you solve this problem. When we do, I can add the solution to the original post.
I tried it with both Chrome and firefox. I did add type=module in the script tag. And yes, index.html and main.js are part of the same directory.
I will share my code on github with you. Maybe we will be able to find the reason for the error together and see whether it is an error that occurs more often in that context...
I would be happy to assist you. Could you please link the exact file or folder you would like me to look at?
in the src/main/resources/templates you can find the index.html as well as the main.js
Thank you for your response. I will have a look at this after work.