Assets are not loading when starting as production

I have installed Erpnext and started it as production.

The nginx config has these lines that i had to comment out to load the assets when starting through “bench start” command but this is not the issue i am talking about.

#location /assets {
#	try_files $uri =404;

So when the bench is started as production the assets do not load and shows 404 error.
But when bench is started as develop through “bench start” command they are loading.

This is the “bench build” output and the screenshot of the output of any asset when loaded.
I had to put the link to the output as it is large enough to not fit in this editor.



Any help in debugging the issue is welcome.