How can I add react project to an existing jquery/vanilla js project?

I have a main/hero website built with html+jquery and dashboard with react. Currently dashboard serves from different subdomain (dashboard.example.com)and website from (example.com). I would like them to be in same folder such that website would still be (example.com) but dashboard would be (example.com/dashboard). Can someone help me how I can achieve this?

Answers:

Thank you for visiting the Q&A section on Magenaut. Please note that all the answers may not help you solve the issue immediately. So please treat them as advisements. If you found the post helpful (or not), leave a comment & I’ll get back to you as soon as possible.

Method 1

maybe you can try this trick:

  • create new child folder called dashboard inside your public folder, and move index.html with build file react dashboard, inside the dashboard public folder.
  • and then load react js build bundle from the move index.html inside dashboard folder.

they will be called into the new folder dashboard in example.com/dashboard


All methods was sourced from stackoverflow.com or stackexchange.com, is licensed under cc by-sa 2.5, cc by-sa 3.0 and cc by-sa 4.0

0 0 votes
Article Rating
Subscribe
Notify of
guest

0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x