How to integrate existing React application with typescript in existing ASP .Net MVC project?

Viewed 61

Following are things that I have tried for solving the problem mentioned:

  1. Created React build using "npm run build" command for existing React application using Redux and Typescript

  2. After build got generated I tried accessing "../../../../build/static/js/main.f8fbcfa1.js" file in script tag on html page. Please find below snapshot of the code for doing this:

     <div id="root"></div>
     <script defer="defer" src="../../../../build/static/js/main.f8fbcfa1.js">
     </script> 
    
  3. When I try to access page in browser the React Application does not get rendered in the div having ID as root.

  4. Blank page is displayed

Note - Normal React App works in above scenario but React app with typescript is causing issue

Please let me know any pointers for resolving this issue.

0 Answers
Related