i am using webpack 5.64.1 in react application . after i run command "npm run build". i get build folder in my project. i uploaded all files from build folder to /usr/share/nginx/html/
here is my nginx configuration file
server {
listen 80;
listen 443 ssl;
server_name *********;
ssl_certificate /etc/ssl/certs/fullchain.pem;
ssl_certificate_key /etc/ssl/certs/privkey.pem;
root /usr/share/nginx/html;
index index.html index.htm;
location / {
try_files $uri /index.html;
}
access_log /var/log/nginx/*****-access.log;
error_log /var/log/nginx/******.com-error.log;
}
when i access my website using browser it generates following error in console
1-Uncaught SyntaxError: Unexpected token '<' for file main.***.js 2-Manifest: Line: 1, column: 1, Syntax error. in c22d0795e9e5a7e609fc.json file
after inspecting it it network tab i have come to realize that preview for these files are not available. though these are returning 200 status code.
Thank you in advance