Bundling and integrating the updated code

With the React 360 code updated to fetch and render game details dynamically from the server, we can bundle this code using the provided bundle script and place the newly compiled files in the dist folder of the MERN VR Game project directory.

To bundle the React 360 code from the command line, go to the React 360 MERNVR project folder and run:

npm run bundle

This will generate the client.bundle.js and index.bundle.js bundle files in the build/ folder with the updated React 360 code. These files, along with the index.html and static_assets folders, need to be added to the MERN VR Game application code as discussed in Chapter 10Developing a Web-Based VR Game, to integrate the latest VR game code ...

Get Full-Stack React Projects now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.