0

I didn't know how to name this question but here is the thing. I installed React with NPM: npx create-react-app my-app and I start app with npm start. After that localhost:3000 opens. The thing is html file in folder public isn't connected anyhow to the script.

I want to serve the development with package called "serve". The only thing there is nothing to serve, the HTML file in public isn't updated at all while I can't serve App.js or anything like that.

Is it required to use CDN links for this task? Or how else it is possible to connect React to that generated html file?

1 Answer 1

1

You need to setup your environment with Webpack. you can follow this tutorial: https://www.valentinog.com/blog/react-webpack-babel/

Or you can clone a react boilerplate project from github directly.

Sign up to request clarification or add additional context in comments.

1 Comment

Thanks but that was for Linux, here is guide for both: medium.com/@fastlane80/…. That was so hard to do, I definitely will never remember so many strange console commands, do people do this all the time? I hear about Webpack as a "future technology" or something and yet it was required to do a lot of weird stuff while I was stuck like 4 times doing that. Do people do this all the time for every next project?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.