How I can combining laravel and create-react-app kit?
I want to change the entry point from root/react/public/index.html, to root/resources/views/index.blade.php, how can I do this without using npm run eject?
Thank you!
I know it's a question from two years ago, but in case someone stumbles upon this in search for answers, it is now possible to use Create React App in Laravel: https://github.com/mjsarfatti/create-react-app-laravel/
/public folder is wiped out and recreated on every build, you can refer to the docs for a detailed explanation on what happens.You basically need to copy the contents from index.html to index.blade.php and make sure to update the app.js and app.css paths so they point to the correct paths
However, with this approach you will have issues using the full set of features that react offers when served via node.js (like react-router for example) so your best bet for any real like application would be to use react with node for frontend and then connect it to Laravel via a REST api to make backend calls