Closed IngilevichV closed 5 years ago
I get a 404 on the bundle.js
Simply put, anything found in src/main/resources/static
gets copied into target/classes/static
, from where it will be served up by Spring Boot.
For this tutorial, I have webpack building src/main/resources/static/built/bundle.js
(that let's me flag built
as a folder for git to ignore). To load it, I have to do this:
<script src="built/bundle.js"></script>
You need to run ./mvnw package
and verify the path to your bundle.js
in the target
folder. Without more details about your setup, not sure I can help you.
Feel free to reopen if this issue continues to plague you.
In my login.html page I have specifed the div with id "react":
<div id="react"/>
The file bundle.js is generated correctly, but when the page login.html loads, it cannot load the script bundle.js, and I always get the error 302.