简体   繁体   中英

Spring boot and react.js

I have a simple spring boot project which uses the frontend-maven-plugin for development of react js files. It also includes webpack maven sure plugin execution. I can see that when I make changes to the app.js file that I have it correctly regenerates the bundle.js under static/built/bundles.js. The server is meant to be listening on the static folder, as I am using liveReload, and any change to .css or html gets updated when i refresh the page. However a ctrl + F5 doesnt update the javascript changes that are visible in bundle.js.

My app is basically the security app here with some changes -> https://spring.io/guides/tutorials/react-and-spring-data-rest/

What do I need to do to make sure it picks up the js changes without restarting the server?

I only have 4 gigs on my laptop, I can see that there is enough memory available, but the building is just going to 99% in eclipse and not finishing. If i stop the listener for changes ie stop from command line npm(npm run-script watch )or webpacK the build finishes in eclipse. IS there contention here/locking or is my laptop just not powerful enough?

This was a locking issue, webpack and node.js were running separately as processes, which i checked in Task Manager. Once i removed the pom entry and stopped the Node.js processes running the issue was fixed. Strange that an example on the internet doesn't mention this.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM