Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

JavaScript React Router Basics Going Further with Routes Navigating Routes Programmatically

Gabriel Ward
Gabriel Ward
20,222 Points

How does one deploy a Webpack + React App to a live server?

I've been following these tutorials, and I'm wanting to know, how do I go about deploying a Webpack + React app to a live server/production environment? I'd be really grateful for any resources or advice anyone has to give on this. Is it as simple as loading the index.html and build.js files via ftp to a host? I've not seen anything on Treehouse about how to go about doing this.

1 Answer

Alex Warner
PLUS
Alex Warner
Courses Plus Student 4,987 Points

Yes, you're correct, when you run your Webpack script it should create the necessary bundle of files commonly in a folder called 'dist'. Be sure your index.html is referencing the .js files in the correct order and then upload all the files to your server.