Reputation: 1100
I have created a simple react app and built the app using npm run build
command and uploaded it to host. it works but whole application directory is visible in web browser console. So how do i fix it to not to show web directory on web console. Once the application kept growing and sensible data will visible. So is there any method to avoid that.
Here's the on cPanel File Manager
and js directory has minified js like this,
But once it loads on web browser it shows App.js
content,
Any suggestions.
Upvotes: 4
Views: 1137
Reputation: 2356
After running "npm run build" , publish your "build" folder. Not your "public" folder.
Upvotes: 1