spring-attic / tut-react-and-spring-data-rest

React.js and Spring Data REST :: A tutorial based on the 5-part blog series by Greg Turnquist
https://spring.io/guides/tutorials/react-and-spring-data-rest
882 stars 1.57k forks source link

Loading JavaScript modules #66

Closed simsinght closed 6 years ago

simsinght commented 7 years ago

This section needs more detail.

I'm following along building my own CRUD API app but I can't for the life of me figure out how these are installed, or what's happening at this step.

Basically the issue I'm running into is that bundle.js hasn't been generated. Not sure at what point it should've been.

simsinght commented 7 years ago

Ended up copying over the every node module from basic/node_modules, to my own node_modules, and also copying over the webpack.config.js (and copy pasting the frontend-maven-plugin into pom.xml).

It generated bundle.js, but I'm wondering what the correct workflow should've been. And how can I generate a package.json.

gregturn commented 7 years ago

package.json files are created by putting basics about the project manually, and then having dependencies added by doing npm install --save or npm install --save-dev commands as the means to make updates. This then lets you do an npm install command to actually pull down the files.

webpack.config.js is written by hand, and used by webpack to generate the whole bundle.js compiled JavaScript module loaded by the your webapp.

gregturn commented 6 years ago

Resolved via https://github.com/spring-guides/tut-react-and-spring-data-rest/commit/a35840993a548b46643d0446337c57e09820c4ef