1

I'm new to React and I build react apps using React + Vite app. My projects run perfectly in development mode. I build an app using npm run build command. I get a 'dist' folder which is absolutely fine.

The problem is that when I deploy the dist folder in Cpanel I get a blank page on the webpage. No content is there inside <body> </body> of html when I inspect the page. Why is this happening and how do I fix it? help me :'(

1
  • 1
    Can you include more information? What does the index.html file from the dist folder look like? How are you hosting the JS and CSS files? This is generally an issue with paths for import so you want to look at the <link> and <script> elements in the <head>. Commented Nov 16, 2023 at 18:16

1 Answer 1

0

yeah I changed the path (removed "/") in the index.html and it worked. thanks!

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

Comments

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.